Hyperlinkv0.8.0-beta.28

BigInt

BigInt.isLessThanconsteffect/BigInt.ts:343
(that: bigint): (self: bigint) => boolean
(self: bigint, that: bigint): boolean

Returns true if the first argument is less than the second, otherwise false.

When to use

Use to test whether one bigint is strictly less than another.

Example (Checking less-than comparisons)

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

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