Comparable

Various comparison operators and methods. All operators have a precedence level of 4.

a == b  Boolean

Is a equivalent to b?

For your definitions, this should be a deep equality check, as opposed to equals?:.

a /= b  Boolean

Inverse of ==, i.e. (a == b) not.

a equals?: b  Boolean

Performs a strict equality check on a and b using internal comparison. Usually you'll want ==, but this may be used for checking identity, etc.

a < b  Boolean

Is a less than b?

a > b  Boolean

Is a greater than b?

a <= b  Boolean

Is a less than or equal to b?

a >= b  Boolean

Is a greater than or equal to b?

a max: b  any

Returns the larger of a and b using the comparison operator >.

a min: b  any

Returns the smaller of a and b using the comparison operator <.