Home > dict-utils > dictReduce
Iterate over a dictionary to incrementally create a single value
Signature:
export declare function dictReduce<T, R>(from: Dict<T>, reducer: IReducerFn<T, R>, initialVal: R): R;
Parameter | Type | Description |
---|---|---|
from | Dict<T> |
dictionary to iterate over |
reducer | IReducerFn<T, R> |
reducer function |
initialVal | R |
initial value that the accumulator starts with |
Returns:
R