fold

open fun fold(empty: A, combine: (A, A) -> A, source: S): A(source)

Fold using the given empty element and combine.