import * as fun from "https://deno.land/x/fun@v.2.0.0-alpha.11/ord.ts";
Variables
The canonical implementation of Contravariant for Ord. It contains the method contramap. |
Functions
Construct an exclusive between function over A from Ord. | |
Construct an inclusive clamp function over A from Ord. | |
Derives an instance of Ord by take an existing Ord over D and a function that turns an L into D and returns an Ord over L. | |
Derives an Ord from a Compare function. | |
f gt | Construct a curried greater than function over A from Ord. |
f gte | Construct a curried greater than or equal to function over A from Ord. |
f lt | Construct a curried less than function over A from Ord. |
f lte | Construct a curried less than or equal to function over A from Ord. |
f max | Construct a maximum function over A from Ord. |
f min | Construct a minimum function over A from Ord. |
Derive an Ord with the reverse ordering of an existing Ord. | |
f sign | Returns an Ordering from any number according to its relationship with 0. |
Derives an Ord from a structs of Ords. The derived Ord 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 Ord, where all values of A are considered equal. | |
Derives an Ord from a tuple of Ords. The derived Ord 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 Ord as a Higher Kinded Type, with contravariant parameter D corresponding to the 0th index of any Substitutions. | |
I Ord | An Ord is an algebra with a notion of equality and
order. Specifically, Ord extends Eq and thus
inherites an |
Type Aliases
The Compare function takes to values of the same
type and returns an ordering, indicating whether
| |
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 |