fold

@ExperimentalCoroutinesApi inline suspend fun <T, R> Flow<T>.fold(
    initial: R,
    crossinline operation: suspend (acc: R, value: T) -> R
): R
(source)

Accumulates value starting with initial value and applying operation current accumulator value and each element