import { array } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { getOrd } = array;
Given an instance Ord create a Ord<ReadonlyArray>.
Examples
Example 1
Example 1
import * as A from "./array.ts";
import { OrdNumber } from "./number.ts";
const { compare } = A.getOrd(OrdNumber);
const result1 = compare([1, 2], [1, 2]); // 0
const result2 = compare([1, 2], [1]); // 1
const result3 = compare([1, 2, 4], [1, 2, 3]); // -1
Parameters
O: Ord<A>