ELEMENT
signatureThe ELEMENT
signature specifies an abstract key type which
offers a default value and exposes a hashing helper function.
Any structure which ascribes to ELEMENT
also implicitly ascribes to
HASHKEY
,
ORDKEY
and
EQKEY
.
type t
val default : t
val equal : t * t → bool
val compare : t * t → order
val hashgen : t → Hashing.hashgen
val hash : t → int
val toString : t → string
type t
val equal :
t * t → bool
val compare :
t * t → order
LESS
, EQUAL
, or
GREATER
as appropriate for the argument pair. This
operation is transitive. It is also consistent: compare (x, y) = EQUAL
if and only if
equal (x, y)
, and compare (x, y) = LESS
if and only if compare (y, x) = GREATER
.val hash :
t → int
val toString :
t → string