import { Reducer } from "https://deno.land/x/rimbu@0.13.5/common/internal.ts";
const { combineObj } = Reducer;
Returns a Reducer
that combines multiple input reducers
by providing input values to all of them and collecting the outputs in the shape of the given object.
Examples
Example 1
Example 1
const red = Reducer.combineObj({
theSum: Reducer.sum,
theAverage: Reducer.average
});
Stream.range({ amount: 9 }).reduce(red);
// => { theSum: 36, theAverage: 4 }