.TH "MoreLabels.Hashtbl.HashedType" 3o source: 2019-01-25 OCamldoc "OCaml library" .SH NAME MoreLabels.Hashtbl.HashedType \- no description .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 .I val equal : .B t -> t -> bool .sp The equality predicate used to compare keys\&. .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 .sp \- ( .B (=) , .B Hashtbl\&.hash ) for comparing objects by structure (provided objects do not contain floats) .sp \- ( .B (fun x y \-> compare x y = 0) , .B Hashtbl\&.hash ) for comparing objects by structure and handling .B Pervasives\&.nan correctly .sp \- ( .B (==) , .B Hashtbl\&.hash ) for comparing objects by physical equality (e\&.g\&. for mutable or cyclic objects)\&. .sp