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 single value using a reducer function.
Returns
A function that accepts an input sync iterable and returns the reduced value.
Example
Remarks
Available as
reduce
when imported frompeter-piper/sync
.