import { trivial } from "https://deno.land/x/fun@v.2.0.0-alpha.11/ord.ts";
Create a trivial Ord, where all values of A are considered equal.
Examples
Example 1
Example 1
import { lt, trivial } from "./ord.ts";
import { pipe } from "./fn.ts";
const date = trivial<Date>();
const now = new Date();
const later = new Date(Date.now() + 60 * 60 * 1000);
const result1 = pipe(now, lt(date)(later)); // false
const result2 = pipe(later, lt(date)(now)); // false
const result3 = pipe(now, date.equals(later)); // true