import { Reducer } from "https://deno.land/x/rimbu@1.2.0/core/mod.ts";
const { Base } = Reducer;
A base class that can be used to easily create Reducer
instances.
Methods
collectInput<I2>(collectFun: CollectFun<I2, I>): Reducer<I2, O>
compile(): Reducer.Instance<I, O>
filterInput(pred: () => boolean, options?: { negate?: boolean | undefined; }): Reducer<never, O>
flatMapInput<I2>(flatMapFun: (value: I2, index: number) => StreamSource<I>): Reducer<I2, O>
sliceInput(from?, amount?: number): Reducer<I, O>
takeOutput(amount: number): Reducer<I, O>
takeOutputUntil(pred: (value: O, index: number) => boolean, options?: { negate?: boolean; }): Reducer<I, O>