import { AsyncReducer } from "https://deno.land/x/rimbu@0.13.5/common/index.ts";
const { contains } = AsyncReducer;
Returns an AsyncReducer
that outputs false as long as the given elem
has not been encountered in the input values, true otherwise.
Examples
Example 1
Example 1
await AsyncStream.from(Stream.range({ amount: 10 })).reduce(AsyncReducer.contains(5)))
// => true
Returns
AsyncReducer<T, boolean>