Skip to main content
Module

x/rimbu/mod.ts>Comp.booleanComp

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Comp.booleanComp
import { Comp } from "https://deno.land/x/rimbu@0.14.0/mod.ts";
const { booleanComp } = Comp;

Returns a default boolean Comp instance that orders booleans according to false < true.

Examples

Example 1

const c = Comp.booleanComp();
console.log(c.compare(false, true) < 0)
// => true
console.log(c.compare(true, true))
// => 0

Returns

Comp<boolean>