reduction

inline fun <T, R> Iterable<T>.reduction(initial: R, operation: (R, T) -> R): List<R>

Creates reduction of the given Iterable. This function can be used for example for cumulative sums.

Sources

Katlib source
Link copied to clipboard