1Hashtbl.Make(3)                  OCaml library                 Hashtbl.Make(3)
2
3
4

NAME

6       Hashtbl.Make  -  Functor  building  an  implementation of the hashtable
7       structure.
8

Module

10       Module   Hashtbl.Make
11

Documentation

13       Module Make
14        : functor (H : HashedType) -> sig end
15
16
17       Functor building an implementation of  the  hashtable  structure.   The
18       functor  Hashtbl.Make returns a structure containing a type key of keys
19       and a type 'a t of hash tables associating data of type 'a to  keys  of
20       type  key  .   The operations perform similarly to those of the generic
21       interface, but use the hashing and equality functions specified in  the
22       functor  argument H instead of generic equality and hashing.  Since the
23       hash function is not seeded, the create operation of the result  strucā€
24       ture always returns non-randomized hash tables.
25
26
27       Parameters:
28
29       "H"
30
31       Hashtbl.HashedType
32
33
34
35
36
37
38
39       type key
40
41
42
43
44       type 'a t
45
46
47
48
49
50       val create : int -> 'a t
51
52
53
54
55       val clear : 'a t -> unit
56
57
58
59
60       val reset : 'a t -> unit
61
62       Since 4.00.0
63
64
65
66       val copy : 'a t -> 'a t
67
68
69
70
71       val add : 'a t -> key -> 'a -> unit
72
73
74
75
76       val remove : 'a t -> key -> unit
77
78
79
80
81       val find : 'a t -> key -> 'a
82
83
84
85
86       val find_opt : 'a t -> key -> 'a option
87
88       Since 4.05.0
89
90
91
92       val find_all : 'a t -> key -> 'a list
93
94
95
96
97       val replace : 'a t -> key -> 'a -> unit
98
99
100
101
102       val mem : 'a t -> key -> bool
103
104
105
106
107       val iter : (key -> 'a -> unit) -> 'a t -> unit
108
109
110
111
112       val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
113
114       Since 4.03.0
115
116
117
118       val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
119
120
121
122
123       val length : 'a t -> int
124
125
126
127
128       val stats : 'a t -> Hashtbl.statistics
129
130       Since 4.00.0
131
132
133
134       val to_seq : 'a t -> (key * 'a) Seq.t
135
136       Since 4.07
137
138
139
140       val to_seq_keys : 'a t -> key Seq.t
141
142       Since 4.07
143
144
145
146       val to_seq_values : 'a t -> 'a Seq.t
147
148       Since 4.07
149
150
151
152       val add_seq : 'a t -> (key * 'a) Seq.t -> unit
153
154       Since 4.07
155
156
157
158       val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
159
160       Since 4.07
161
162
163
164       val of_seq : (key * 'a) Seq.t -> 'a t
165
166       Since 4.07
167
168
169
170
171
172OCamldoc                          2021-01-26                   Hashtbl.Make(3)
Impressum