.TH "Module type" MoreLabels.Hashtbl.HashedType "2003-05-14" OCamldoc "OCaml library"
.SH Module type
Module type   MoreLabels.Hashtbl.HashedType
.SH Documentation
.sp
Module type
.BI "HashedType"
 = 
.B Hashtbl.HashedType

.sp

.sp

.sp
.sp
.I type t 

.sp
The type of the hashtable keys.
.sp

.sp

.I val equal 
: 
.B t -> t -> bool
.sp
The equality predicate used to compare keys.
.sp

.sp

.I val hash 
: 
.B t -> int
.sp
A hashing function on keys. It must be such that if two keys are
equal according to 
.B equal
, then they have identical hash values
as computed by 
.B hash
.
Examples: suitable (
.B equal
, 
.B hash
) pairs for arbitrary key
types include
(
.B (=)
, 
.B Hashtbl.hash
) for comparing objects by structure, and
(
.B (==)
, 
.B Hashtbl.hash
) for comparing objects by addresses
(e.g. for mutable or cyclic keys).
.sp

.sp
