1MoreLabels.Hashtbl.MakeSeeded(3) OCaml libraryMoreLabels.Hashtbl.MakeSeeded(3)
2
3
4

NAME

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

Module

10       Module   MoreLabels.Hashtbl.MakeSeeded
11

Documentation

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