gleam/order
Types
Functions
pub fn compare(a: Order, with b: Order) -> Order
Compares two Order
values to one another, producing a new Order
.
Examples
> compare(Eq, with: Lt)
Gt
pub fn max(a: Order, b: Order) -> Order
Returns the largest of two orders.
Examples
> max(Eq, Lt)
Eq
pub fn min(a: Order, b: Order) -> Order
Returns the smallest of two orders.
Examples
> min(Eq, Lt)
Lt
pub fn reverse(order: Order) -> Order
Inverts an order, so less-than becomes greater-than and greater-than becomes less-than.
Examples
> reverse(Lt)
Gt
> reverse(Eq)
Eq
> reverse(Lt)
Gt