import { reduce } from "https://deno.land/x/fun@v2.0.0-alpha.6/pair.ts";
Reduces a pair with an initial value, also passing the second value into the reducer as well.
Examples
Example 1
Example 1
import { pair, reduce } from "./pair.ts";
import { pipe } from "./fn.ts";
const result = pipe(
pair(10, 20),
reduce(Math.max, Number.NEGATIVE_INFINITY),
); // 20