Kotlin HashSet fold()
Syntax & Examples
Syntax of HashSet.fold()
The syntax of HashSet.fold() extension function is:
fun <T, R> Iterable<T>.fold( initial: R, operation: (acc: R, T) -> R ): R
This fold() extension function of HashSet accumulates value starting with initial value and applying operation from left to right to current accumulator value and each element.