fold
Groups elements from the source sequence by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map. An initial value of accumulator is provided by initialValueSelector function.
This function is delegated to Grouping.fold, more details can be found in its documentation.
Groups elements from the source sequence by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map. An initial value of accumulator is the same initialValue for each group.
This function is delegated to Grouping.fold, more details can be found in its documentation.
Accumulate value starting with initial value and applying operation from left to right to current accumulator value and each element.
The operation is terminal.