Hyperlinkv0.8.0-beta.28

Boolean

Boolean.orconsteffect/Boolean.ts:261
(that: boolean): (self: boolean) => boolean
(self: boolean, that: boolean): boolean

Combines two booleans using OR: self || that.

When to use

Use to accept when either boolean operand is true.

Example (Combining booleans with OR)

import { Boolean } from "effect"
import * as assert from "node:assert"

assert.deepStrictEqual(Boolean.or(true, true), true)
assert.deepStrictEqual(Boolean.or(true, false), true)
assert.deepStrictEqual(Boolean.or(false, true), true)
assert.deepStrictEqual(Boolean.or(false, false), false)
combinators
Source effect/Boolean.ts:2614 lines
export const or: {
  (that: boolean): (self: boolean) => boolean
  (self: boolean, that: boolean): boolean
} = dual(2, (self: boolean, that: boolean): boolean => self || that)