import { array } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { sort } = array;
Returns a new array conuaining elements of as
sorted in ascending order
according to the sort order defined by O
.
Examples
import { ordNumber } from "./sortable.ts";
import { sort } from './array.ts'
import { ordNumber } from "./sortable.ts"; import { sort } from './array.ts'
sort(ordNumber)([3, 1, 2]) // [1, 2, 3]
Parameters
O: Sortable<B>