fold

fun <T, R> Stream<T>.fold(initial: R, operation: (R, T) -> R): Stream<R>

Folds the incoming values with the operation starting with the initial value.