Slide 66
Slide 66 text
Collections. Folding & Reducing
inline fun Iterable.
fold(initial: R, operation: (acc: R, T) -> R): R
foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R
inline fun List.
foldRight(initial: R, operation: (T, acc: R) -> R): R
foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): R
inline fun Iterable.
reduce(operation: (acc: S, T) -> S): S
reduceIndexed(operation: (index: Int, acc: S, T) -> S): S
inline fun List.
reduceRight(operation: (T, acc: S) -> S): S
reduceRightIndexed(operation: (index: Int, T, acc: S) -> S): S