reduce
reduce<
A,B>(init,f): <K>(m) =>B
Defined in: Utils/Dict.ts:409
Folds the dictionary into a single value by applying f to each value in insertion order.
When you also need the key, use reduceWithKey.
Type Parameters
Section titled “Type Parameters”A
B
Parameters
Section titled “Parameters”B
(acc, value) => B
Returns
Section titled “Returns”<
K>(m):B
Type Parameters
Section titled “Type Parameters”K
Parameters
Section titled “Parameters”ReadonlyMap<K, A>
Returns
Section titled “Returns”B