Skip to main content
Module

x/fun/ord.ts>Ordering

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
type alias Ordering
import { type Ordering } from "https://deno.land/x/fun@v2.0.0-alpha.10/ord.ts";

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 first and second, Ordering means the following:

  • -1 : first < second
  • 0 : first = second
  • 1 : first > second
definition: -1 | 0 | 1