1MoreLabels.Hashtbl.HashedType(3) OCaml libraryMoreLabels.Hashtbl.HashedType(3)
2
3
4
6 MoreLabels.Hashtbl.HashedType - no description
7
9 Module type MoreLabels.Hashtbl.HashedType
10
12 Module type HashedType
13 = Hashtbl.HashedType
14
15
16
17
18
19
20
21 type t
22
23
24 The type of the hashtable keys.
25
26
27
28 val equal : t -> t -> bool
29
30 The equality predicate used to compare keys.
31
32
33
34 val hash : t -> int
35
36 A hashing function on keys. It must be such that if two keys are equal
37 according to equal , then they have identical hash values as computed
38 by hash . Examples: suitable ( equal , hash ) pairs for arbitrary key
39 types include
40
41 - ( (=) , Hashtbl.hash ) for comparing objects by structure
42 (provided objects do not contain floats)
43
44 - ( (fun x y -> compare x y = 0) , Hashtbl.hash ) for comparing
45 objects by structure and handling nan correctly
46
47 - ( (==) , Hashtbl.hash ) for comparing objects by physical
48 equality (e.g. for mutable or cyclic objects).
49
50
51
52
53
54
55OCamldoc 2020-09-01 MoreLabels.Hashtbl.HashedType(3)