Hyperlinkv0.8.0-beta.28

Boolean

Boolean.Orderconsteffect/Boolean.ts:135
(self: boolean, that: boolean): Ordering

Provides an Order instance for boolean that allows comparing and sorting boolean values. In this ordering, false is considered less than true.

When to use

Use when you need to sort or compare boolean values through APIs that accept an ordering instance where false comes before true.

Example (Comparing booleans)

import { Boolean } from "effect"

console.log(Boolean.Order(false, true)) // -1 (false < true)
console.log(Boolean.Order(true, false)) // 1 (true > false)
console.log(Boolean.Order(true, true)) // 0 (true === true)
instances
Source effect/Boolean.ts:1351 lines
export const Order: order.Order<boolean> = order.Boolean