Skip to main content
Module

x/fun/boolean.ts>sort

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

Compares two booleans, returning an Ordering. True is greater than False in this ordering, generally, but the specifics are always decided by the runtime.

Examples

Example 1

import { sort } from "./boolean.ts";

const result1 = sort(true, true); // 0
const result2 = sort(true, false); // 1
const result3 = sort(false, true); // -1

Parameters

first: boolean
second: boolean