Kotlin HashSet reduceIndexedOrNull()
Syntax & Examples
Syntax of HashSet.reduceIndexedOrNull()
The syntax of HashSet.reduceIndexedOrNull() extension function is:
fun <S, T : S> Iterable<T>.reduceIndexedOrNull( operation: (index: Int, acc: S, T) -> S ): S?
This reduceIndexedOrNull() extension function of HashSet accumulates value starting with the first element and applying operation from left to right to current accumulator value and each element with its index in the original collection.