import * as fun from "https://deno.land/x/fun@v2.0.0/sortable.ts";
Functions
Construct an exclusive between function over A from Sortable. | |
Construct an inclusive clamp function over A from Sortable. | |
Create a Sortable from a curried Sort. | |
Derives an Sortable from a Compare function. | |
f gt | Construct a curried greater than function over A from Sortable. |
f gte | Construct a curried greater than or equal to function over A from Sortable. |
f lt | Construct a curried less than function over A from Sortable. |
f lte | Construct a curried less than or equal to function over A from Sortable. |
f max | Construct a maximum function over A from Sortable. |
f min | Construct a minimum function over A from Sortable. |
Derives an instance of Sortable by take an existing Sortable over D and a function that turns an L into D and returns an Sortable over L. | |
Derive an Sortable with the reverse ordering of an existing Sortable. | |
f sign | Returns an Ordering from any number according to its relationship with 0. |
Derives an Sortable from a structs of Sortables. The derived Sortable will compare two structs starting with the first defined key and return the first ordering that is non-zero, otherwise the two structs are equal. | |
Create a trivial Sortable, where all values of A are considered equal. | |
Derives an Sortable from a tuple of Sortables. The derived Sortable will compare two tuples starting at index 0 and return the first ordering that is non-zero, otherwise the two tuples are equal. |
Interfaces
Specifies Sortable as a Higher Kinded Type, with contravariant parameter D corresponding to the 0th index of any Substitutions. | |
A Sortable structure has the method sort. |
Type Aliases
The ordering type is the expected output of any
Compare function. The canonical example is the output
of the Array.sort function. For any two values | |
T Sort | The Sort function takes to values of the same
type and returns an ordering, indicating whether
|