kotlin-stdlib / kotlin.coroutines / EmptyCoroutineContext / fold fold Common JVM JS Native 1.0 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.