The ORD_KEY signature pairs an abstract key type with a comparison function that defines a total ordering on the keys. Ordered keys are used in the implementation of ordered maps (ORD_MAP) and ordered sets (ORD_SET).
signature ORD_KEY =
sig
type ord_key
(* abstract type of keys that have a total order *)
val compare : ord_key * ord_key -> order
(* comparison function for the ordering on keys *)
end (* ORD_KEY *)