Skip to main content
Module

x/fun/array.ts>sort

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function sort
import { sort } from "https://deno.land/x/fun@v2.0.0/array.ts";

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'

sort(ordNumber)([3, 1, 2]) // [1, 2, 3]

Returns

<A extends B>(as: ReadonlyArray<A>) => ReadonlyArray<A>