Skip to main content
Module

x/rimbu/mod.ts>AsyncReducer.min

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
variable AsyncReducer.min
import { AsyncReducer } from "https://deno.land/x/rimbu@0.14.0/mod.ts";
const { min } = AsyncReducer;

Returns a Reducer that remembers the minimum value of the numberic inputs.

Examples

Example 1

console.log(Stream.of(5, 3, 7, 4).reduce(Reducer.min()))
// => 3

type

{ (): AsyncReducer<number, number | undefined>; <O>(otherwise: AsyncOptLazy<O>): AsyncReducer<number, number | O>; }