scan
scan<
A,B>(initial,f): (data) => readonlyB[]
Defined in: Data/Arr.ts:793
Like reduce, but returns every intermediate accumulator as an array.
The initial value is not included — the output has the same length as the input.
Type Parameters
Section titled “Type Parameters”A
B
Parameters
Section titled “Parameters”initial
Section titled “initial”B
(acc, a) => B
Returns
Section titled “Returns”(data) => readonly B[]