forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBelt_MutableMapInt.html
258 lines (208 loc) · 19.8 KB
/
Belt_MutableMapInt.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="../api_static/tomorrow-night.css">
<link rel="stylesheet" href="../api_static/style.css" type="text/css">
<script src="../api_static//highlight.pack.js"></script>
<script src="../api_static//script.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<meta charset="utf8">
<link rel="previous" href="Belt_MutableMap.html"><link rel="next" href="Belt_MutableMapString.html">
<title> Belt_MutableMapInt </title></head>
<body>
<nav class="module-index"><ul><li><a href="Belt.html">Belt</a></li>
<li><a href="Belt_Array.html">Belt_Array</a></li>
<li><a href="Belt_Debug.html">Belt_Debug</a></li>
<li><a href="Belt_Float.html">Belt_Float</a></li>
<li><a href="Belt_HashMap.html">Belt_HashMap</a></li>
<li><a href="Belt_HashMapInt.html">Belt_HashMapInt</a></li>
<li><a href="Belt_HashMapString.html">Belt_HashMapString</a></li>
<li><a href="Belt_HashSet.html">Belt_HashSet</a></li>
<li><a href="Belt_HashSetInt.html">Belt_HashSetInt</a></li>
<li><a href="Belt_HashSetString.html">Belt_HashSetString</a></li>
<li><a href="Belt_Id.html">Belt_Id</a></li>
<li><a href="Belt_Int.html">Belt_Int</a></li>
<li><a href="Belt_List.html">Belt_List</a></li>
<li><a href="Belt_Map.html">Belt_Map</a></li>
<li><a href="Belt_MapDict.html">Belt_MapDict</a></li>
<li><a href="Belt_MapInt.html">Belt_MapInt</a></li>
<li><a href="Belt_MapString.html">Belt_MapString</a></li>
<li><a href="Belt_MutableMap.html">Belt_MutableMap</a></li>
<li><a href="Belt_MutableMapInt.html">Belt_MutableMapInt</a></li>
<li><a href="Belt_MutableMapString.html">Belt_MutableMapString</a></li>
<li><a href="Belt_MutableQueue.html">Belt_MutableQueue</a></li>
<li><a href="Belt_MutableSet.html">Belt_MutableSet</a></li>
<li><a href="Belt_MutableSetInt.html">Belt_MutableSetInt</a></li>
<li><a href="Belt_MutableSetString.html">Belt_MutableSetString</a></li>
<li><a href="Belt_MutableStack.html">Belt_MutableStack</a></li>
<li><a href="Belt_Option.html">Belt_Option</a></li>
<li><a href="Belt_Range.html">Belt_Range</a></li>
<li><a href="Belt_Result.html">Belt_Result</a></li>
<li><a href="Belt_Set.html">Belt_Set</a></li>
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
<li><a href="Belt_SetInt.html">Belt_SetInt</a></li>
<li><a href="Belt_SetString.html">Belt_SetString</a></li>
<li><a href="Belt_SortArray.html">Belt_SortArray</a></li>
<li><a href="Belt_SortArrayInt.html">Belt_SortArrayInt</a></li>
<li><a href="Belt_SortArrayString.html">Belt_SortArrayString</a></li>
<li><a href="Belt_internalAVLset.html">Belt_internalAVLset</a></li>
<li><a href="Belt_internalAVLtree.html">Belt_internalAVLtree</a></li>
<li><a href="Belt_internalBuckets.html">Belt_internalBuckets</a></li>
<li><a href="Belt_internalBucketsType.html">Belt_internalBucketsType</a></li>
<li><a href="Belt_internalMapInt.html">Belt_internalMapInt</a></li>
<li><a href="Belt_internalMapString.html">Belt_internalMapString</a></li>
<li><a href="Belt_internalSetBuckets.html">Belt_internalSetBuckets</a></li>
<li><a href="Belt_internalSetInt.html">Belt_internalSetInt</a></li>
<li><a href="Belt_internalSetString.html">Belt_internalSetString</a></li>
<li><a href="Dom.html">Dom</a></li>
<li><a href="Dom_storage.html">Dom_storage</a></li>
<li><a href="Dom_storage2.html">Dom_storage2</a></li>
<li><a href="Js.html">Js</a></li>
<li><a href="Js_array.html">Js_array</a></li>
<li><a href="Js_array2.html">Js_array2</a></li>
<li><a href="Js_cast.html">Js_cast</a></li>
<li><a href="Js_console.html">Js_console</a></li>
<li><a href="Js_date.html">Js_date</a></li>
<li><a href="Js_dict.html">Js_dict</a></li>
<li><a href="Js_exn.html">Js_exn</a></li>
<li><a href="Js_float.html">Js_float</a></li>
<li><a href="Js_global.html">Js_global</a></li>
<li><a href="Js_int.html">Js_int</a></li>
<li><a href="Js_json.html">Js_json</a></li>
<li><a href="Js_list.html">Js_list</a></li>
<li><a href="Js_mapperRt.html">Js_mapperRt</a></li>
<li><a href="Js_math.html">Js_math</a></li>
<li><a href="Js_null.html">Js_null</a></li>
<li><a href="Js_null_undefined.html">Js_null_undefined</a></li>
<li><a href="Js_obj.html">Js_obj</a></li>
<li><a href="Js_option.html">Js_option</a></li>
<li><a href="Js_promise.html">Js_promise</a></li>
<li><a href="Js_re.html">Js_re</a></li>
<li><a href="Js_result.html">Js_result</a></li>
<li><a href="Js_string.html">Js_string</a></li>
<li><a href="Js_string2.html">Js_string2</a></li>
<li><a href="Js_typed_array.html">Js_typed_array</a></li>
<li><a href="Js_typed_array2.html">Js_typed_array2</a></li>
<li><a href="Js_types.html">Js_types</a></li>
<li><a href="Js_undefined.html">Js_undefined</a></li>
<li><a href="Js_vector.html">Js_vector</a></li>
<li><a href="Node.html">Node</a></li>
<li><a href="Node_buffer.html">Node_buffer</a></li>
<li><a href="Node_child_process.html">Node_child_process</a></li>
<li><a href="Node_fs.html">Node_fs</a></li>
<li><a href="Node_module.html">Node_module</a></li>
<li><a href="Node_path.html">Node_path</a></li>
<li><a href="Node_process.html">Node_process</a></li></ul></nav>
<div class="navbar"><a class="pre" href="Belt_MutableMap.html" title="Belt_MutableMap">Previous</a>
<a class="up" href="index.html" title="Index">Up</a>
<a class="post" href="Belt_MutableMapString.html" title="Belt_MutableMapString">Next</a>
</div>
<h1>Module <a href="type_Belt_MutableMapInt.html">Belt_MutableMapInt</a></h1>
<pre><span id="MODULEBelt_MutableMapInt"><span class="keyword">module</span> Belt_MutableMapInt</span>: <code class="code">sig</code> <a href="Belt_MutableMapInt.html">..</a> <code class="code">end</code></pre><hr width="100%">
<pre><span id="TYPEkey"><span class="keyword">type</span> <code class="type"></code>key</span> = <code class="type">int</code> </pre>
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type">'a</code> t</span> </pre>
<pre><span id="VALmake"><span class="keyword">val</span> make</span> : <code class="type">unit -> 'a <a href="Belt_MutableMapInt.html#TYPEt">t</a></code></pre>
<pre><span id="VALclear"><span class="keyword">val</span> clear</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> unit</code></pre>
<pre><span id="VALisEmpty"><span class="keyword">val</span> isEmpty</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> bool</code></pre>
<pre><span id="VALhas"><span class="keyword">val</span> has</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> bool</code></pre>
<pre><span id="VALcmpU"><span class="keyword">val</span> cmpU</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> 'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> ('a -> 'a -> int [@bs]) -> int</code></pre>
<pre><span id="VALcmp"><span class="keyword">val</span> cmp</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> 'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> ('a -> 'a -> int) -> int</code></pre><div class="info ">
<div class="not-examples">
<code class="code">cmp m1 m2 cmp</code>
First compare by size, if size is the same,
compare by key, value pair<br>
</div>
</div>
<pre><span id="VALeqU"><span class="keyword">val</span> eqU</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> 'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> ('a -> 'a -> bool [@bs]) -> bool</code></pre>
<pre><span id="VALeq"><span class="keyword">val</span> eq</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> 'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> ('a -> 'a -> bool) -> bool</code></pre><div class="info ">
<div class="not-examples">
<code class="code">eq m1 m2 cmp</code><br>
</div>
</div>
<pre><span id="VALforEachU"><span class="keyword">val</span> forEachU</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> unit [@bs]) -> unit</code></pre>
<pre><span id="VALforEach"><span class="keyword">val</span> forEach</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> unit) -> unit</code></pre><div class="info ">
<div class="not-examples">
<code class="code">forEach m f</code> applies <code class="code">f</code> to all bindings in map <code class="code">m</code>.
<code class="code">f</code> receives the key as first argument, and the associated value
as second argument.
The application order of <code class="code">f</code> is in increasing order.<br>
</div>
</div>
<pre><span id="VALreduceU"><span class="keyword">val</span> reduceU</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> 'b -> ('b -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> 'b [@bs]) -> 'b</code></pre>
<pre><span id="VALreduce"><span class="keyword">val</span> reduce</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> 'b -> ('b -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> 'b) -> 'b</code></pre><div class="info ">
<div class="not-examples">
<code class="code">reduce m a f</code> computes <code class="code">(f kN dN ... (f k1 d1 a)...)</code>,
where <code class="code">k1 ... kN</code> are the keys of all bindings in <code class="code">m</code>
(in increasing order), and <code class="code">d1 ... dN</code> are the associated data.<br>
</div>
</div>
<pre><span id="VALeveryU"><span class="keyword">val</span> everyU</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> bool [@bs]) -> bool</code></pre>
<pre><span id="VALevery"><span class="keyword">val</span> every</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> bool) -> bool</code></pre><div class="info ">
<div class="not-examples">
<code class="code">every m p</code> checks if all the bindings of the map
satisfy the predicate <code class="code">p</code>.
The application order of <code class="code">p</code> is unspecified.<br>
</div>
</div>
<pre><span id="VALsomeU"><span class="keyword">val</span> someU</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> bool [@bs]) -> bool</code></pre>
<pre><span id="VALsome"><span class="keyword">val</span> some</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> bool) -> bool</code></pre><div class="info ">
<div class="not-examples">
<code class="code">some m p</code> checks if at least one binding of the map
satisfy the predicate <code class="code">p</code>.
The application order of <code class="code">p</code> is unspecified.<br>
</div>
</div>
<pre><span id="VALsize"><span class="keyword">val</span> size</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> int</code></pre>
<pre><span id="VALtoList"><span class="keyword">val</span> toList</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> * 'a) list</code></pre><div class="info ">
<div class="not-examples">
In increasing order<br>
</div>
</div>
<pre><span id="VALtoArray"><span class="keyword">val</span> toArray</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> * 'a) array</code></pre>
<pre><span id="VALfromArray"><span class="keyword">val</span> fromArray</span> : <code class="type">(<a href="Belt_MutableMapInt.html#TYPEkey">key</a> * 'a) array -> 'a <a href="Belt_MutableMapInt.html#TYPEt">t</a></code></pre>
<pre><span id="VALkeysToArray"><span class="keyword">val</span> keysToArray</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> array</code></pre>
<pre><span id="VALvaluesToArray"><span class="keyword">val</span> valuesToArray</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> 'a array</code></pre>
<pre><span id="VALminKey"><span class="keyword">val</span> minKey</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> option</code></pre>
<pre><span id="VALminKeyUndefined"><span class="keyword">val</span> minKeyUndefined</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> <a href="Js.html#TYPEundefined">Js.undefined</a></code></pre>
<pre><span id="VALmaxKey"><span class="keyword">val</span> maxKey</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> option</code></pre>
<pre><span id="VALmaxKeyUndefined"><span class="keyword">val</span> maxKeyUndefined</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> <a href="Js.html#TYPEundefined">Js.undefined</a></code></pre>
<pre><span id="VALminimum"><span class="keyword">val</span> minimum</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> * 'a) option</code></pre>
<pre><span id="VALminUndefined"><span class="keyword">val</span> minUndefined</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> * 'a) <a href="Js.html#TYPEundefined">Js.undefined</a></code></pre>
<pre><span id="VALmaximum"><span class="keyword">val</span> maximum</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> * 'a) option</code></pre>
<pre><span id="VALmaxUndefined"><span class="keyword">val</span> maxUndefined</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> * 'a) <a href="Js.html#TYPEundefined">Js.undefined</a></code></pre>
<pre><span id="VALget"><span class="keyword">val</span> get</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a option</code></pre>
<pre><span id="VALgetUndefined"><span class="keyword">val</span> getUndefined</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a <a href="Js.html#TYPEundefined">Js.undefined</a></code></pre>
<pre><span id="VALgetWithDefault"><span class="keyword">val</span> getWithDefault</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> 'a</code></pre>
<pre><span id="VALgetExn"><span class="keyword">val</span> getExn</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a</code></pre>
<pre><span id="VALcheckInvariantInternal"><span class="keyword">val</span> checkInvariantInternal</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="not-examples">
<b>raise</b> when invariant is not held<br>
</div>
</div>
<pre><span id="VALremove"><span class="keyword">val</span> remove</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> unit</code></pre><div class="info ">
<div class="not-examples">
<code class="code">remove m x</code> do the in-place modification<br>
</div>
</div>
<pre><span id="VALremoveMany"><span class="keyword">val</span> removeMany</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> array -> unit</code></pre>
<pre><span id="VALset"><span class="keyword">val</span> set</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> unit</code></pre><div class="info ">
<div class="not-examples">
<code class="code">set m x y</code> do the in-place modification, return
<code class="code">m</code> for chaining. If <code class="code">x</code> was already bound
in <code class="code">m</code>, its previous binding disappears.<br>
</div>
</div>
<pre><span id="VALupdateU"><span class="keyword">val</span> updateU</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> ('a option -> 'a option [@bs]) -> unit</code></pre>
<pre><span id="VALupdate"><span class="keyword">val</span> update</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> <a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> ('a option -> 'a option) -> unit</code></pre>
<pre><span id="VALmapU"><span class="keyword">val</span> mapU</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> ('a -> 'b [@bs]) -> 'b <a href="Belt_MutableMapInt.html#TYPEt">t</a></code></pre>
<pre><span id="VALmap"><span class="keyword">val</span> map</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -> ('a -> 'b) -> 'b <a href="Belt_MutableMapInt.html#TYPEt">t</a></code></pre><div class="info ">
<div class="not-examples">
<code class="code">map m f</code> returns a map with same domain as <code class="code">m</code>, where the
associated value <code class="code">a</code> of all bindings of <code class="code">m</code> has been
replaced by the result of the application of <code class="code">f</code> to <code class="code">a</code>.
The bindings are passed to <code class="code">f</code> in increasing order
with respect to the ordering over the type of the keys.<br>
</div>
</div>
<pre><span id="VALmapWithKeyU"><span class="keyword">val</span> mapWithKeyU</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> 'b [@bs]) -> 'b <a href="Belt_MutableMapInt.html#TYPEt">t</a></code></pre>
<pre><span id="VALmapWithKey"><span class="keyword">val</span> mapWithKey</span> : <code class="type">'a <a href="Belt_MutableMapInt.html#TYPEt">t</a> -><br> (<a href="Belt_MutableMapInt.html#TYPEkey">key</a> -> 'a -> 'b) -> 'b <a href="Belt_MutableMapInt.html#TYPEt">t</a></code></pre></body></html>