Module type Interfaces.SORTABLE

Interface for a sortable type. A type is sortable, if it has a comparison function.

type t

Type of elements which have a linear order.

val compare : t -> t -> int

compare a b Compare the values a and b, both of type t. Return values:

compare a b < 0 if and only if a < b

compare a b = 0 if and only if a = b

compare a b > 0 if and only if a > b