Skip to main content
Module

x/fun/ord.ts>min

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function min
import { min } from "https://deno.land/x/fun@v.2.0.0-alpha.11/ord.ts";

Construct a minimum function over A from Ord.

Examples

Example 1

import * as O from "./ord.ts";
import { OrdNumber } from "./number.ts";
import { pipe } from "./fn.ts";

const min = O.min(OrdNumber);

const result1 = pipe(1, min(2)); // 1
const result2 = pipe(2, min(1)); // 1
const result3 = pipe(1, min(1)); // 1

Returns

(snd: A) => (fst: A) => A