kotlin-stdlib / kotlin.coroutines / CoroutineContext / fold fold Common JVM JS Native 1.0 abstract fun <R> fold( initial: R, operation: (R, Element) -> R): R(source) 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.