import { type AsyncReducer } from "https://deno.land/x/rimbu@0.13.2/mod.ts";
const { Impl } = AsyncReducer;
Methods
optional
onClose(state: S, error?: unknown): MaybePromise<void>An optional function that is called when the reducer will no longer receive values.
Returns an AsyncReducer
instance that only passes values to the reducer that satisy the given pred
predicate.
Returns an AsyncReducer
instance that converts its input values using given mapFun
before passing them to the reducer.
Returns an AsyncReducer
instance that converts or filters its input values using given collectFun
before passing them to the reducer.
Returns an AsyncReducer
instance that takes at most the given amount
of input elements, and will ignore subsequent elements.