import { type AsyncReducer } from "https://deno.land/x/rimbu@1.0.5/common/internal.ts";
const { Impl } = AsyncReducer;
Properties
The initial state value for the reducer algorithm.
An optional function that is called when the reducer will no longer receive values.
Methods
Returns the next state based on the given input values
Returns the output value based on the given state
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 converts its output values using given mapFun
.
Returns an AsyncReducer
instance that takes at most the given amount
of input elements, and will ignore subsequent elements.
Returns a Reducer
instance that skips the first given amount
of input elements, and will process subsequent elements.
Returns a Reducer
instance that takes given amount
of elements starting at given from
index, and ignores other elements.