Const
Aggregates all elements from the source iterable into a single value using the provided accumulator.
Curried version of _aggregate.
Element type produced by the source iterable.
Accumulator result type yielded after processing the entire sequence.
Initial accumulator value supplied to the first call of aggFunc.
aggFunc
Combiner invoked with the previous accumulator, current element, and current index.
The final accumulator value after iterating through the entire source.
const total = _aggregate([1, 2, 3], 0, (acc, n) => acc + n);console.log(total); // 6 Copy
const total = _aggregate([1, 2, 3], 0, (acc, n) => acc + n);console.log(total); // 6
or using the curried version:
const total = pipeInto( [1, 2, 3], aggregate(0, (acc, n) => acc + n));console.log(total); // 6 Copy
const total = pipeInto( [1, 2, 3], aggregate(0, (acc, n) => acc + n));console.log(total); // 6
Aggregates all elements from the source iterable into a single value using the provided accumulator.
Curried version of _aggregate.