reduceRightIndexedOrNull

abstract fun reduceRightIndexedOrNull(operation: (index: Int, T, acc: T) -> T): T?

使用指定的 operation 从右到左对数组的元素及其索引进行累积操作。 如果数组为空,则返回 null。

参考 kotlin.collections.reduceRightIndexedOrNull

Return

累积操作的结果,如果数组为空,则返回 null。

Parameters

operation

用于累积值的函数。