List.Accumulate

構文

List.Accumulate(list as list, seed as any, accumulator as function) as any

バージョン情報

accumulator を使用して、リスト list 内の項目から要約値を収集します。 省略可能なシード パラメーター seed を設定できます。

例 1

((state, current) => state + current ) を使用して、リスト {1, 2, 3, 4, 5} 内の項目から要約値を収集します。

使用方法

List.Accumulate({1, 2, 3, 4, 5}, 0, (state, current) => state + current)

出力

15