Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/sortable.ts>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 Ordering
import { type Ordering } from "https://deno.land/x/fun@v2.0.0/sortable.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