import { AsyncReducer } from "https://deno.land/x/rimbu@1.2.0/core/mod.ts";
const { single } = AsyncReducer;
Returns an AsyncReducer that only produces an output value when having receives exactly one
input value, otherwise will return the otherwise
value or undefined.
type
{ <T>(): AsyncReducer<T, T | undefined>; <T, O>(otherwise: AsyncOptLazy<O>): AsyncReducer<T, T | O>; }
type
{ <T>(): AsyncReducer<T, T | undefined>; <T, O>(otherwise: AsyncOptLazy<O>): AsyncReducer<T, T | O>; }