Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

min

import { min } from "https://raw.githubusercontent.com/baetheus/fun/main/sortable.ts";

Construct a minimum function over A from Sortable.

@example
import * as O from "./sortable.ts";
import { SortableNumber } from "./number.ts";
import { pipe } from "./fn.ts";

const min = O.min(SortableNumber);

const result1 = pipe(1, min(2)); // 1
const result2 = pipe(2, min(1)); // 1
const result3 = pipe(1, min(1)); // 1
function min<A>({ sort }: Sortable<A>): (snd: A) => (fst: A) => A;
§
min<A>({ sort }: Sortable<A>): (snd: A) => (fst: A) => A
[src]

§Type Parameters

§Parameters

§
{ sort }: Sortable<A>
[src]

§Return Type

§
(snd: A) => (fst: A) => A
[src]