foldIndexed

abstract fun <R> foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R

使用 operation 函数累积此数组的元素及其索引到一个单一值。

参考 kotlin.collections.foldIndexed

Return

累积结果

Parameters

R

结果类型

initial

初始累积值

operation

用于累积值的函数