reduce()
reduce<
A,B>(f,seed): (source) =>B
Reduces an iterable to a single value.
Type Parametersβ
A: Aβ
Element type
B: Bβ
Accumulator type
Parametersβ
f: (acc, a) => Bβ
The reducer function
seed: Bβ
The initial accumulator
Returnsβ
A function that reduces an iterable
Sinceβ
2.4.0