import { getOrd } from "https://deno.land/x/fun@v.2.0.0-alpha.11/option.ts";
Create an instance of Ord<Option> given an instance of Ord.
Examples
Example 1
Example 1
import * as O from "./option.ts";
import * as N from "./number.ts";
const Ord = O.getOrd(N.OrdNumber);
const result1 = Ord.compare(O.some(1), O.some(2)); // 1
const result2 = Ord.compare(O.some(1), O.some(1)); // 0
const result3 = Ord.compare(O.none, O.none); // 0
const result4 = Ord.compare(O.none, O.some(1)); // -1