forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBelt_internalMapString.S.html
197 lines (175 loc) · 11.3 KB
/
Belt_internalMapString.S.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
<!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_internalMapString.A.html">
<title> Belt_internalMapString.S </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_internalMapString.A.html" title="Belt_internalMapString.A">Previous</a>
<a class="up" href="Belt_internalMapString.html" title="Belt_internalMapString">Up</a>
</div>
<h1>Module <a href="type_Belt_internalMapString.S.html">Belt_internalMapString.S</a></h1>
<pre><span id="MODULES"><span class="keyword">module</span> S</span>: <code class="type"><a href="Belt_SortArray.html">Belt_SortArray</a></code></pre><hr width="100%">
<pre><span id="MODULEInt"><span class="keyword">module</span> <a href="Belt_SortArray.Int.html">Int</a></span>: <code class="type"><a href="Belt_SortArrayInt.html">Belt_SortArrayInt</a></code></pre> <div class="info">
<div class="not-examples">
Specalized when key type is <code class="code">int</code>, more efficient
than the generic type<br>
</div>
</div>
<pre><span id="MODULEString"><span class="keyword">module</span> <a href="Belt_SortArray.String.html">String</a></span>: <code class="type"><a href="Belt_SortArrayString.html">Belt_SortArrayString</a></code></pre> <div class="info">
<div class="not-examples">
Specalized when key type is <code class="code">string</code>, more efficient
than the generic type<br>
</div>
</div>
<pre><span id="VALstrictlySortedLengthU"><span class="keyword">val</span> strictlySortedLengthU</span> : <code class="type">'a array -> ('a -> 'a -> bool [@bs]) -> int</code></pre>
<pre><span id="VALstrictlySortedLength"><span class="keyword">val</span> strictlySortedLength</span> : <code class="type">'a array -> ('a -> 'a -> bool) -> int</code></pre><div class="info ">
<div class="not-examples">
<code class="code">strictlySortedLenght xs cmp</code>
return <code class="code">+n</code> means increasing order
<code class="code">-n</code> means negative order<br>
</div>
<div class="examples">
<pre class="example"> <pre class="codepre"><code class="code"> strictlySortedLength [|1;2;3;4;3|] (fun x y -> x < y) = 4;;
strictlySortedLength [||] (fun x y -> x < y) = 0;;
strictlySortedLength [|1|] (fun x y -> x < y) = 1;;
strictlySortedLength [|4;3;2;1|] (fun x y -> x < y) = -4;;
</code></pre> </pre>
</div>
</div>
<pre><span id="VALisSortedU"><span class="keyword">val</span> isSortedU</span> : <code class="type">'a array -> ('a -> 'a -> int [@bs]) -> bool</code></pre>
<pre><span id="VALisSorted"><span class="keyword">val</span> isSorted</span> : <code class="type">'a array -> ('a -> 'a -> int) -> bool</code></pre><div class="info ">
<div class="not-examples">
<code class="code">isSorted arr cmp</code><br>
<div class="tag"> <li><b>Returns</b> true if array is increasingly sorted (equal is okay )</li>
</div>
</div>
<div class="examples">
<pre class="example"> <pre class="codepre"><code class="code"> isSorted [|1;1;2;3;4|] (fun x y -> compare x y) = true
</code></pre> </pre>
</div>
</div>
<pre><span id="VALstableSortInPlaceByU"><span class="keyword">val</span> stableSortInPlaceByU</span> : <code class="type">'a array -> ('a -> 'a -> int [@bs]) -> unit</code></pre>
<pre><span id="VALstableSortInPlaceBy"><span class="keyword">val</span> stableSortInPlaceBy</span> : <code class="type">'a array -> ('a -> 'a -> int) -> unit</code></pre><div class="info ">
<div class="not-examples">
<code class="code">stableSortBy xs cmp</code>
Sort xs in place using comparator <code class="code">cmp</code>, the stable means if the elements
are equal, their order will be preserved<br>
</div>
</div>
<pre><span id="VALstableSortByU"><span class="keyword">val</span> stableSortByU</span> : <code class="type">'a array -> ('a -> 'a -> int [@bs]) -> 'a array</code></pre>
<pre><span id="VALstableSortBy"><span class="keyword">val</span> stableSortBy</span> : <code class="type">'a array -> ('a -> 'a -> int) -> 'a array</code></pre><div class="info ">
<div class="not-examples">
<code class="code">stableSort xs cmp</code><br>
<div class="tag"> <li><b>Returns</b> a fresh array
The same as <a href="Belt_SortArray.html#VALstableSortInPlaceBy"><code class="code">Belt_SortArray.stableSortInPlaceBy</code></a> except that <code class="code">xs</code> is not modified</li>
</div>
</div>
</div>
<pre><span id="VALbinarySearchByU"><span class="keyword">val</span> binarySearchByU</span> : <code class="type">'a array -> 'a -> ('a -> 'a -> int [@bs]) -> int</code></pre>
<pre><span id="VALbinarySearchBy"><span class="keyword">val</span> binarySearchBy</span> : <code class="type">'a array -> 'a -> ('a -> 'a -> int) -> int</code></pre><div class="info ">
<div class="not-examples">
If value is not found and value is less than one or more elements in array,
the negative number returned is the bitwise complement of the index of the first element
that is larger than value.
If value is not found and value is greater than all elements in array,
the negative number returned is the bitwise complement of
(the index of the last element plus 1)
for example, if <code class="code">key</code> is smaller than all elements return <code class="code">-1</code> since <code class="code">lnot (-1) = 0</code>
if <code class="code">key</code> is larger than all elements return <code class="code">- (len + 1)</code> since <code class="code">lnot (-(len+1)) = len</code><br>
</div>
<div class="examples">
<pre class="example"> <pre class="codepre"><code class="code"> binarySearchBy [|1;2;3;4;33;35;36|] 33 = 4;;
lnot (binarySearchBy [|1;3;5;7|] 4) = 2;;
</code></pre> </pre>
</div>
</div>
</body></html>