suspend fun <S, T : S> Flow<T>.reduce(operation: suspend (S, T) -> S): S
Content copied to clipboard
Accumulates value starting with the first element and applying operation to current accumulator value and each element. Throws NoSuchElementException if flow was empty.