Utils.Comparable
Interface for comparable and hashable types. Modules implementing this interface can be an argument of Map.Make, Set.Make or Hashtbl.Make.
Map.Make
Set.Make
Hashtbl.Make
type t
val equal : t -> t -> bool
Equality over t.
t
val compare : t -> t -> int
Comparison over t. compare x y returns 0 iff equal x y = 0. If x and y are not equal, it returns a negative integer iff x is lesser than y and a positive integer otherwise.
compare x y
0
equal x y = 0
x
y
val hash : t -> int
A hash function over t.