import { AsyncReducer } from "https://deno.land/x/rimbu@1.2.0/mod.ts";
const { race } = AsyncReducer;
Returns an AsyncReducer
that feeds incoming values to all reducers in the provided reducers
source, and halts when the first
reducer in the array is halted and returns the output of that reducer. Returns the otherwise
value if no reducer is yet halted.
type
{ <T, R, O>(reducers: AsyncReducer.Accept<T, R>[], otherwise: AsyncOptLazy<O>): AsyncReducer<T, R | O>; <T, R>(reducers: AsyncReducer.Accept<T, R>[]): AsyncReducer<T, R | undefined>; }
type
{ <T, R, O>(reducers: AsyncReducer.Accept<T, R>[], otherwise: AsyncOptLazy<O>): AsyncReducer<T, R | O>; <T, R>(reducers: AsyncReducer.Accept<T, R>[]): AsyncReducer<T, R | undefined>; }