The ORD_KEY signature

The ORD_KEY signature defines an interface to an abstract type of keys with a comparison function. This signature is used as the argument to various implementations of finite maps and sets.

Synopsis

signature ORD_KEY

Interface

type ord_key

val compare : ord_key * ord_key -> order

Description

type ord_key

The abstract key type.

val compare : ord_key * ord_key -> order

compare (k1, k2) returns the relation between the two keys. This function should define a total order on the ord_key type.