fold

Common
JVM
JS
Native
1.0
open fun <R> fold(
    initial: R,
    operation: (R, Element) -> R
): R

Accumulates entries of this context starting with initial value and applying operation from left to right to current accumulator value and each element of this context.