Member of the starry suite—modular functions for iterable objects.
Status
Applies to the whole suite.
Usage
Applies an accumulator function over an iterable.
Parameters:
- iterable:
Iterable<T>
- accumulator:
(previousValue, currentValue)
- An accumulator function over the iterable.- previousValue - The accumulate or the initial value.
- current - The current item of the iterable. Must return - The new accumulate.
- initialValue - Optional via argument length. The initial accumulator value.
This works like Array.prototype.reduce
.