UNPKG

@thi.ng/transducers

Version:

Collection of ~170 lightweight, composable transducers, reducers, generators, iterators for functional data transformations

11 lines (10 loc) 190 B
import { reduce, reducer } from "./reduce.js"; function min(src) { return src ? reduce(min(), src) : reducer( () => Infinity, (acc, x) => Math.min(acc, x) ); } export { min };