Package: effect
Module: Order
Checks whether one value is strictly greater than another according to the given order.
When to use
Use when you need a boolean greater-than predicate using an Order.
Details
Returns true if the order returns 1, meaning the first value is greater
than the second. Equal or lesser values return false.
Example (Checking greater-than comparisons)
import { Order } from "effect"
const isGreaterThanNumber = Order.isGreaterThan(Order.Number)
console.log(isGreaterThanNumber(2, 1)) // true
console.log(isGreaterThanNumber(1, 2)) // false
console.log(isGreaterThanNumber(1, 1)) // false
See
isGreaterThanOrEqualTo for non-strict greater than or equalisLessThan for strict less thanSignature
declare const isGreaterThan: <A>(O: Order<A>) => { (that: A): (self: A) => boolean; (self: A, that: A): boolean; }
Since v4.0.0