(that: bigint): (self: bigint) => boolean
(self: bigint, that: bigint): booleanReturns a function that checks if a given bigint is greater than or equal to the provided one.
When to use
Use to test whether one bigint is greater than or equal to another.
Example (Checking greater-than-or-equal comparisons)
import { BigInt } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(2n, 3n), false)
assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(3n, 3n), true)
assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(4n, 3n), true)export const const isGreaterThanOrEqualTo: {
(that: bigint): (self: bigint) => boolean
(self: bigint, that: bigint): boolean
}
Returns a function that checks if a given bigint is greater than or equal to the provided one.
When to use
Use to test whether one bigint is greater than or equal to another.
Example (Checking greater-than-or-equal comparisons)
import { BigInt } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(2n, 3n), false)
assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(3n, 3n), true)
assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(4n, 3n), true)
isGreaterThanOrEqualTo: {
(that: bigintthat: bigint): (self: bigintself: bigint) => boolean
(self: bigintself: bigint, that: bigintthat: bigint): boolean
} = import orderorder.const isGreaterThanOrEqualTo: <A>(
O: Order<A>
) => {
(that: A): (self: A) => boolean
(self: A, that: A): boolean
}
Checks whether one value is greater than or equal to another according to the given order.
When to use
Use when you need a boolean greater-than-or-equal predicate using an
Order.
Details
Returns true if the order returns 1 or 0, and returns false only if
the order returns -1.
Example (Checking greater-than-or-equal comparisons)
import { Order } from "effect"
const isGreaterThanOrEqualToNumber = Order.isGreaterThanOrEqualTo(Order.Number)
console.log(isGreaterThanOrEqualToNumber(2, 1)) // true
console.log(isGreaterThanOrEqualToNumber(1, 1)) // true
console.log(isGreaterThanOrEqualToNumber(1, 2)) // false
isGreaterThanOrEqualTo(const Order: order.Order<bigint>Provides an Order instance for bigint that allows comparing and sorting BigInt values.
When to use
Use when you need to sort or compare bigint values through APIs that accept
an ordering instance.
Example (Comparing bigints with Order)
import { BigInt } from "effect"
const a = 123n
const b = 456n
const c = 123n
console.log(BigInt.Order(a, b)) // -1 (a < b)
console.log(BigInt.Order(b, a)) // 1 (b > a)
console.log(BigInt.Order(a, c)) // 0 (a === c)
Order)