import { getSortableArray } from "https://deno.land/x/fun@v2.0.0-alpha.12/array.ts";
Given an instance Sortable create a Sortable<ReadonlyArray>.
Examples
Example 1
Example 1
import * as A from "./array.ts";
import { SortableNumber } from "./number.ts";
const { sort } = A.getSortableArray(SortableNumber);
const result1 = sort([1, 2], [1, 2]); // 0
const result2 = sort([1, 2], [1]); // 1
const result3 = sort([1, 2, 4], [1, 2, 3]); // -1