Skip to main content
Module

x/fun/mod.ts>sortable.Ordering

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

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