fold

abstract fun <R> fold(initial: R, operation: (acc: R, PT) -> R): R

通过对每个元素应用操作来累积值.

参考 kotlin.collections.fold

Return

最终累积值

Parameters

initial

初始值

operation

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