Kotlin HashSet runningReduceIndexed()
Syntax & Examples
Syntax of HashSet.runningReduceIndexed()
The syntax of HashSet.runningReduceIndexed() extension function is:
fun <S, T : S> Iterable<T>.runningReduceIndexed( operation: (index: Int, acc: S, T) -> S ): List<S>
This runningReduceIndexed() extension function of HashSet returns a list containing successive accumulation values generated by applying operation from left to right to each element, its index in the original collection and current accumulator value that starts with the first element of this collection.