Module

x/rambda/immutable.d.ts>sort

Faster and smaller alternative to Ramda
Latest
function sort
import { sort } from "https://dotland.deno.dev/x/rambda@9.4.1/immutable.d.ts";

It returns copy of list sorted by sortFn function, where sortFn needs to return only -1, 0 or 1.

Parameters

sortFn: (a: T, b: T) => number
list: readonly T[]

Returns

readonly T[]

Parameters

sortFn: (a: T, b: T) => number

Returns

(list: readonly T[]) => readonly T[]