import { min } from "https://deno.land/x/fun@v2.0.0-alpha.6/semigroup.ts";
Create a semigroup fron an instance of Ord that returns that minimum for the type being ordered. This Semigroup functions identically to min from Ord.
Examples
Example 1
Example 1
import * as SG from "./semigroup.ts";
import * as N from "./number.ts";
import { pipe } from "./fn.ts";
const { concat } = SG.min(N.OrdNumber);
const smallest = pipe(
0,
concat(-1),
concat(10),
concat(1000),
concat(5),
concat(9001)
); // smallest is -1