Ƭ ReduceWith: function
Defined in index.ts:18
Reduce function (reduces stream to single value)
▸ (iterable
: Iterable‹S›): D
Parameters:
Name | Type | Description |
---|---|---|
iterable |
Iterable‹S› | input stream |
Ƭ ReducerFunction: function
Defined in index.ts:6
Reducer function to accumulate value
▸ (reduced
: D, item
: S, index
: number): D
Parameters:
Name | Type | Description |
---|---|---|
reduced |
D | accumulator |
item |
S | item to accumulate |
index |
number | item index in stream |
▸ reduceWith‹S, D›(reducer
: ReducerFunction‹S, D›, initial
: D): ReduceWith‹S, D›
Defined in index.ts:33
Function to execute a reducer function on each element of the stream, resulting in a single output value
Type parameters:
▪ S
▪ D
Parameters:
Name | Type | Description |
---|---|---|
reducer |
ReducerFunction‹S, D› | function to reduce stream to a single value |
initial |
D | initial accumulated result |
Returns: ReduceWith‹S, D›
reduce function
▸ reduceWith‹S, D›(reducer
: ReducerFunction‹S, D›, initial
: D, iterable
: Iterable‹S›): D
Defined in index.ts:45
Function to execute a reducer function on each element of the stream, resulting in a single output value
Type parameters:
▪ S
▪ D
Parameters:
Name | Type | Description |
---|---|---|
reducer |
ReducerFunction‹S, D› | function to reduce stream to a single value |
initial |
D | initial accumulated result |
iterable |
Iterable‹S› | input stream |
Returns: D
accumulation result