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