reduceIndexed

abstract fun reduceIndexed(operation: (index: Int, acc: PT, PT) -> PT): PT

通过对数组元素应用操作来累积值,并提供元素索引.

参考 kotlin.collections.reduceIndexed

Return

最终累积值

Parameters

operation

用于将累积值、元素索引和元素组合的函数

Throws