Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/boolean.ts

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

The boolean module contains combinators for working with boolean.

Variables

The canonical implementation of Comparable for boolean. It contains the method equals.

A function that always returns false.

A function that always returns true.

The canonical implementation of Initializable for boolean that combines using the logical and operator. It contains the method combine.

The canonical implementation of Initializable for boolean that combines using the logical or operator. It contains the method combine.

The canoncial implementation of Showable for boolean. It uses JSON.stringify to turn a boolean into a string. It contains the method show.

The canonical implementation of Sortable for boolean. It contains the method lt, lte, equals, gte, gt, min, max, clamp, between, and compare.

Functions

A curried form of logical And.

Test the equality of two booleans.

A type guard, indicating that a value is a boolean.

Create a match function over boolean

Negate a given boolean.

A curried form of logical Or.

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