import { type Reducer } from "https://deno.land/x/rimbu@1.0.0/common/reducer.ts";
const { Impl } = Reducer;
The Implementation interface for a Reducer
, which also exposes the internal state type.
Methods
Returns the next state based on the given input values
Returns a Reducer
instance that only passes values to the reducer that satisy the given pred
predicate.
Returns a Reducer
instance that converts its input values using given mapFun
before passing them to the reducer.
Returns a Reducer
instance that converts or filters its input values using given collectFun
before passing them to the reducer.
Returns a Reducer
instance that converts its output values using given mapFun
.
Returns a Reducer
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.