foldRightIndexed

abstract fun <R> foldRightIndexed(initial: R, operation: (index: Int, PT, acc: R) -> R): R

通过从最后一个元素到第一个元素应用操作来累积值,并提供元素索引.

参考 kotlin.collections.foldRightIndexed

Return

最终累积值

Parameters

initial

初始值

operation

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