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