std.cmp
Functionality for ordering and comparison.
Types
Eq a
defines equality (==) on a
type Bool =
| False
| True
Bool
represents a value which can only be True
or False
Ord a
defines an ordering on a
type Ordering =
| LT
| EQ
| GT
Ordering
represents the result of comparing two values
Values
Tests whether the values are equal.
Tests whether the values are not equal.
Compares two values and returns wheter the first is less than, equal or greater than the second.
Returns whether l
is less than r
.
Returns whether l
is less than or equal to r
.
Returns whether l
is greater than or equal to r
.
Returns whether l
is greater than r
.
Semigroup a
represents an associative operation on a
.
This means the following laws must hold:
forall x . append x (append y z) == append (append x y) z
Monoid a
represents an semigroup an which has an identity. This means
the following additional laws must hold:
forall x . append x empty == x
forall x . append empty x == x