The type of elements in the input sync iterable.
The type of the output value. Defaults to T
.
A reducer function that takes the accumulator, a value, and its index.
Optional
initialValue: UOptional. The initial value of the accumulator. If not provided, the first value of the iterable is used.
Generated using TypeDoc
Reduces an input sync iterable to a sequence of accumulated values using a reducer function.
Returns
A function that accepts an input sync iterable and returns an iterable that yields accumulated values.
Example
Remarks
Available as
scan
when imported frompeter-piper/sync
.