cumulative

inline fun <T, R> Iterator<T>.cumulative(initial: R, crossinline operation: (R, T) -> R): Iterator<R>(source)

Generic cumulative operation on iterator.

Parameters

T

the type of initial iterable.

R

the type of resulting iterable.

initial

lazy evaluated.


inline fun <T, R> Iterable<T>.cumulative(initial: R, crossinline operation: (R, T) -> R): Iterable<R>(source)
inline fun <T, R> Sequence<T>.cumulative(initial: R, crossinline operation: (R, T) -> R): Sequence<R>(source)
inline fun <T, R> List<T>.cumulative(initial: R, crossinline operation: (R, T) -> R): List<R>(source)