Hyperlinkv0.8.0-beta.28

BigInt

BigInt.isLessThanOrEqualToconsteffect/BigInt.ts:369
(that: bigint): (self: bigint) => boolean
(self: bigint, that: bigint): boolean

Returns a function that checks if a given bigint is less than or equal to the provided one.

When to use

Use to test whether one bigint is less than or equal to another.

Example (Checking less-than-or-equal comparisons)

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

assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(2n, 3n), true)
assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(3n, 3n), true)
assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(4n, 3n), false)
predicates
Source effect/BigInt.ts:3694 lines
export const isLessThanOrEqualTo: {
  (that: bigint): (self: bigint) => boolean
  (self: bigint, that: bigint): boolean
} = order.isLessThanOrEqualTo(Order)