@grain/stdlib 0.5.13 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/CHANGELOG.md +193 -0
  2. package/LICENSE +1 -1
  3. package/README.md +25 -2
  4. package/array.gr +1512 -199
  5. package/array.md +2032 -94
  6. package/bigint.gr +239 -140
  7. package/bigint.md +450 -106
  8. package/buffer.gr +595 -102
  9. package/buffer.md +903 -145
  10. package/bytes.gr +401 -110
  11. package/bytes.md +551 -63
  12. package/char.gr +228 -49
  13. package/char.md +373 -7
  14. package/exception.gr +26 -12
  15. package/exception.md +29 -5
  16. package/float32.gr +130 -109
  17. package/float32.md +185 -57
  18. package/float64.gr +112 -99
  19. package/float64.md +185 -57
  20. package/hash.gr +47 -37
  21. package/hash.md +21 -3
  22. package/int16.gr +430 -0
  23. package/int16.md +618 -0
  24. package/int32.gr +200 -269
  25. package/int32.md +254 -289
  26. package/int64.gr +142 -225
  27. package/int64.md +254 -289
  28. package/int8.gr +511 -0
  29. package/int8.md +786 -0
  30. package/json.gr +2084 -0
  31. package/json.md +608 -0
  32. package/list.gr +120 -68
  33. package/list.md +125 -80
  34. package/map.gr +560 -57
  35. package/map.md +672 -56
  36. package/marshal.gr +239 -227
  37. package/marshal.md +36 -4
  38. package/number.gr +626 -676
  39. package/number.md +738 -153
  40. package/option.gr +33 -35
  41. package/option.md +58 -42
  42. package/package.json +2 -2
  43. package/path.gr +148 -187
  44. package/path.md +47 -96
  45. package/pervasives.gr +75 -416
  46. package/pervasives.md +85 -180
  47. package/priorityqueue.gr +433 -74
  48. package/priorityqueue.md +422 -54
  49. package/queue.gr +362 -80
  50. package/queue.md +433 -38
  51. package/random.gr +67 -75
  52. package/random.md +68 -40
  53. package/range.gr +135 -63
  54. package/range.md +198 -43
  55. package/rational.gr +284 -0
  56. package/rational.md +545 -0
  57. package/regex.gr +933 -1066
  58. package/regex.md +59 -60
  59. package/result.gr +23 -25
  60. package/result.md +54 -39
  61. package/runtime/atof/common.gr +78 -82
  62. package/runtime/atof/common.md +22 -10
  63. package/runtime/atof/decimal.gr +102 -127
  64. package/runtime/atof/decimal.md +28 -7
  65. package/runtime/atof/lemire.gr +56 -71
  66. package/runtime/atof/lemire.md +9 -1
  67. package/runtime/atof/parse.gr +83 -110
  68. package/runtime/atof/parse.md +12 -2
  69. package/runtime/atof/slow.gr +28 -35
  70. package/runtime/atof/slow.md +9 -1
  71. package/runtime/atof/table.gr +19 -18
  72. package/runtime/atof/table.md +10 -2
  73. package/runtime/atoi/parse.gr +153 -136
  74. package/runtime/atoi/parse.md +50 -1
  75. package/runtime/bigint.gr +410 -517
  76. package/runtime/bigint.md +71 -57
  77. package/runtime/compare.gr +176 -85
  78. package/runtime/compare.md +31 -1
  79. package/runtime/dataStructures.gr +144 -32
  80. package/runtime/dataStructures.md +267 -31
  81. package/runtime/debugPrint.gr +34 -15
  82. package/runtime/debugPrint.md +37 -5
  83. package/runtime/equal.gr +53 -52
  84. package/runtime/equal.md +30 -1
  85. package/runtime/exception.gr +38 -47
  86. package/runtime/exception.md +10 -8
  87. package/runtime/gc.gr +23 -152
  88. package/runtime/gc.md +13 -17
  89. package/runtime/malloc.gr +31 -31
  90. package/runtime/malloc.md +11 -3
  91. package/runtime/numberUtils.gr +191 -172
  92. package/runtime/numberUtils.md +17 -9
  93. package/runtime/numbers.gr +1695 -1021
  94. package/runtime/numbers.md +1098 -134
  95. package/runtime/string.gr +540 -242
  96. package/runtime/string.md +76 -6
  97. package/runtime/unsafe/constants.gr +30 -13
  98. package/runtime/unsafe/constants.md +80 -0
  99. package/runtime/unsafe/conv.gr +55 -28
  100. package/runtime/unsafe/conv.md +41 -9
  101. package/runtime/unsafe/memory.gr +10 -30
  102. package/runtime/unsafe/memory.md +15 -19
  103. package/runtime/unsafe/tags.gr +37 -21
  104. package/runtime/unsafe/tags.md +88 -8
  105. package/runtime/unsafe/wasmf32.gr +30 -36
  106. package/runtime/unsafe/wasmf32.md +64 -56
  107. package/runtime/unsafe/wasmf64.gr +30 -36
  108. package/runtime/unsafe/wasmf64.md +64 -56
  109. package/runtime/unsafe/wasmi32.gr +49 -66
  110. package/runtime/unsafe/wasmi32.md +102 -94
  111. package/runtime/unsafe/wasmi64.gr +52 -79
  112. package/runtime/unsafe/wasmi64.md +108 -100
  113. package/runtime/utils/printing.gr +13 -15
  114. package/runtime/utils/printing.md +11 -3
  115. package/runtime/wasi.gr +294 -295
  116. package/runtime/wasi.md +62 -42
  117. package/set.gr +574 -64
  118. package/set.md +634 -54
  119. package/stack.gr +181 -64
  120. package/stack.md +271 -42
  121. package/string.gr +453 -533
  122. package/string.md +241 -151
  123. package/uint16.gr +369 -0
  124. package/uint16.md +585 -0
  125. package/uint32.gr +470 -0
  126. package/uint32.md +737 -0
  127. package/uint64.gr +471 -0
  128. package/uint64.md +737 -0
  129. package/uint8.gr +369 -0
  130. package/uint8.md +585 -0
  131. package/uri.gr +1093 -0
  132. package/uri.md +477 -0
  133. package/{sys → wasi}/file.gr +914 -500
  134. package/{sys → wasi}/file.md +454 -50
  135. package/wasi/process.gr +292 -0
  136. package/{sys → wasi}/process.md +164 -6
  137. package/wasi/random.gr +77 -0
  138. package/wasi/random.md +80 -0
  139. package/{sys → wasi}/time.gr +15 -22
  140. package/{sys → wasi}/time.md +5 -5
  141. package/immutablearray.gr +0 -929
  142. package/immutablearray.md +0 -1038
  143. package/immutablemap.gr +0 -493
  144. package/immutablemap.md +0 -479
  145. package/immutablepriorityqueue.gr +0 -360
  146. package/immutablepriorityqueue.md +0 -291
  147. package/immutableset.gr +0 -498
  148. package/immutableset.md +0 -449
  149. package/runtime/debug.gr +0 -2
  150. package/runtime/debug.md +0 -6
  151. package/runtime/unsafe/errors.gr +0 -36
  152. package/runtime/unsafe/errors.md +0 -204
  153. package/sys/process.gr +0 -254
  154. package/sys/random.gr +0 -79
  155. package/sys/random.md +0 -66
package/int32.md CHANGED
@@ -10,12 +10,12 @@ No other changes yet.
10
10
  </details>
11
11
 
12
12
  ```grain
13
- import Int32 from "int32"
13
+ from "int32" include Int32
14
14
  ```
15
15
 
16
- ## Conversions
16
+ ## Values
17
17
 
18
- Functions for converting between Numbers and the Int32 type.
18
+ Functions and constants included in the Int32 module.
19
19
 
20
20
  ### Int32.**fromNumber**
21
21
 
@@ -25,7 +25,7 @@ No other changes yet.
25
25
  </details>
26
26
 
27
27
  ```grain
28
- fromNumber : Number -> Int32
28
+ fromNumber : (number: Number) => Int32
29
29
  ```
30
30
 
31
31
  Converts a Number to an Int32.
@@ -50,7 +50,7 @@ No other changes yet.
50
50
  </details>
51
51
 
52
52
  ```grain
53
- toNumber : Int32 -> Number
53
+ toNumber : (value: Int32) => Number
54
54
  ```
55
55
 
56
56
  Converts an Int32 to a Number.
@@ -67,36 +67,32 @@ Returns:
67
67
  |----|-----------|
68
68
  |`Number`|The Int32 represented as a Number|
69
69
 
70
- ## Operations
71
-
72
- Mathematical operations for Int32 values.
73
-
74
- ### Int32.**incr**
70
+ ### Int32.**fromUint32**
75
71
 
76
72
  <details disabled>
77
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
73
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
78
74
  No other changes yet.
79
75
  </details>
80
76
 
81
77
  ```grain
82
- incr : Int32 -> Int32
78
+ fromUint32 : (number: Uint32) => Int32
83
79
  ```
84
80
 
85
- Increments the value by one.
81
+ Converts a Uint32 to an Int32.
86
82
 
87
83
  Parameters:
88
84
 
89
85
  |param|type|description|
90
86
  |-----|----|-----------|
91
- |`value`|`Int32`|The value to increment|
87
+ |`number`|`Uint32`|The value to convert|
92
88
 
93
89
  Returns:
94
90
 
95
91
  |type|description|
96
92
  |----|-----------|
97
- |`Int32`|The incremented value|
93
+ |`Int32`|The Uint32 represented as an Int32|
98
94
 
99
- ### Int32.**decr**
95
+ ### Int32.**incr**
100
96
 
101
97
  <details disabled>
102
98
  <summary tabindex="-1">Added in <code>0.2.0</code></summary>
@@ -104,24 +100,24 @@ No other changes yet.
104
100
  </details>
105
101
 
106
102
  ```grain
107
- decr : Int32 -> Int32
103
+ incr : (value: Int32) => Int32
108
104
  ```
109
105
 
110
- Decrements the value by one.
106
+ Increments the value by one.
111
107
 
112
108
  Parameters:
113
109
 
114
110
  |param|type|description|
115
111
  |-----|----|-----------|
116
- |`value`|`Int32`|The value to decrement|
112
+ |`value`|`Int32`|The value to increment|
117
113
 
118
114
  Returns:
119
115
 
120
116
  |type|description|
121
117
  |----|-----------|
122
- |`Int32`|The decremented value|
118
+ |`Int32`|The incremented value|
123
119
 
124
- ### Int32.**add**
120
+ ### Int32.**decr**
125
121
 
126
122
  <details disabled>
127
123
  <summary tabindex="-1">Added in <code>0.2.0</code></summary>
@@ -129,36 +125,42 @@ No other changes yet.
129
125
  </details>
130
126
 
131
127
  ```grain
132
- add : (Int32, Int32) -> Int32
128
+ decr : (value: Int32) => Int32
133
129
  ```
134
130
 
135
- Computes the sum of its operands.
131
+ Decrements the value by one.
136
132
 
137
133
  Parameters:
138
134
 
139
135
  |param|type|description|
140
136
  |-----|----|-----------|
141
- |`x`|`Int32`|The first operand|
142
- |`y`|`Int32`|The second operand|
137
+ |`value`|`Int32`|The value to decrement|
143
138
 
144
139
  Returns:
145
140
 
146
141
  |type|description|
147
142
  |----|-----------|
148
- |`Int32`|The sum of the two operands|
143
+ |`Int32`|The decremented value|
149
144
 
150
- ### Int32.**sub**
145
+ ### Int32.**(+)**
151
146
 
152
- <details disabled>
153
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
154
- No other changes yet.
147
+ <details>
148
+ <summary>Added in <code>0.6.0</code></summary>
149
+ <table>
150
+ <thead>
151
+ <tr><th>version</th><th>changes</th></tr>
152
+ </thead>
153
+ <tbody>
154
+ <tr><td><code>0.2.0</code></td><td>Originally named `add`</td></tr>
155
+ </tbody>
156
+ </table>
155
157
  </details>
156
158
 
157
159
  ```grain
158
- sub : (Int32, Int32) -> Int32
160
+ (+) : (x: Int32, y: Int32) => Int32
159
161
  ```
160
162
 
161
- Computes the difference of its operands.
163
+ Computes the sum of its operands.
162
164
 
163
165
  Parameters:
164
166
 
@@ -171,20 +173,27 @@ Returns:
171
173
 
172
174
  |type|description|
173
175
  |----|-----------|
174
- |`Int32`|The difference of the two operands|
176
+ |`Int32`|The sum of the two operands|
175
177
 
176
- ### Int32.**mul**
178
+ ### Int32.**(-)**
177
179
 
178
- <details disabled>
179
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
180
- No other changes yet.
180
+ <details>
181
+ <summary>Added in <code>0.6.0</code></summary>
182
+ <table>
183
+ <thead>
184
+ <tr><th>version</th><th>changes</th></tr>
185
+ </thead>
186
+ <tbody>
187
+ <tr><td><code>0.2.0</code></td><td>Originally named `sub`</td></tr>
188
+ </tbody>
189
+ </table>
181
190
  </details>
182
191
 
183
192
  ```grain
184
- mul : (Int32, Int32) -> Int32
193
+ (-) : (x: Int32, y: Int32) => Int32
185
194
  ```
186
195
 
187
- Computes the product of its operands.
196
+ Computes the difference of its operands.
188
197
 
189
198
  Parameters:
190
199
 
@@ -197,20 +206,27 @@ Returns:
197
206
 
198
207
  |type|description|
199
208
  |----|-----------|
200
- |`Int32`|The product of the two operands|
209
+ |`Int32`|The difference of the two operands|
201
210
 
202
- ### Int32.**div**
211
+ ### Int32.**(*)**
203
212
 
204
- <details disabled>
205
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
206
- No other changes yet.
213
+ <details>
214
+ <summary>Added in <code>0.6.0</code></summary>
215
+ <table>
216
+ <thead>
217
+ <tr><th>version</th><th>changes</th></tr>
218
+ </thead>
219
+ <tbody>
220
+ <tr><td><code>0.2.0</code></td><td>Originally named `mul`</td></tr>
221
+ </tbody>
222
+ </table>
207
223
  </details>
208
224
 
209
225
  ```grain
210
- div : (Int32, Int32) -> Int32
226
+ (*) : (x: Int32, y: Int32) => Int32
211
227
  ```
212
228
 
213
- Computes the quotient of its operands using signed division.
229
+ Computes the product of its operands.
214
230
 
215
231
  Parameters:
216
232
 
@@ -223,20 +239,27 @@ Returns:
223
239
 
224
240
  |type|description|
225
241
  |----|-----------|
226
- |`Int32`|The quotient of its operands|
242
+ |`Int32`|The product of the two operands|
227
243
 
228
- ### Int32.**divU**
244
+ ### Int32.**(/)**
229
245
 
230
- <details disabled>
231
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
232
- No other changes yet.
246
+ <details>
247
+ <summary>Added in <code>0.6.0</code></summary>
248
+ <table>
249
+ <thead>
250
+ <tr><th>version</th><th>changes</th></tr>
251
+ </thead>
252
+ <tbody>
253
+ <tr><td><code>0.2.0</code></td><td>Originally named `div`</td></tr>
254
+ </tbody>
255
+ </table>
233
256
  </details>
234
257
 
235
258
  ```grain
236
- divU : (Int32, Int32) -> Int32
259
+ (/) : (x: Int32, y: Int32) => Int32
237
260
  ```
238
261
 
239
- Computes the quotient of its operands using unsigned division.
262
+ Computes the quotient of its operands using signed division.
240
263
 
241
264
  Parameters:
242
265
 
@@ -259,7 +282,7 @@ No other changes yet.
259
282
  </details>
260
283
 
261
284
  ```grain
262
- rem : (Int32, Int32) -> Int32
285
+ rem : (x: Int32, y: Int32) => Int32
263
286
  ```
264
287
 
265
288
  Computes the remainder of the division of its operands using signed division.
@@ -277,41 +300,22 @@ Returns:
277
300
  |----|-----------|
278
301
  |`Int32`|The remainder of its operands|
279
302
 
280
- ### Int32.**remU**
281
-
282
- <details disabled>
283
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
284
- No other changes yet.
285
- </details>
286
-
287
- ```grain
288
- remU : (Int32, Int32) -> Int32
289
- ```
290
-
291
- Computes the remainder of the division of its operands using unsigned division.
292
-
293
- Parameters:
294
-
295
- |param|type|description|
296
- |-----|----|-----------|
297
- |`x`|`Int32`|The first operand|
298
- |`y`|`Int32`|The second operand|
299
-
300
- Returns:
301
-
302
- |type|description|
303
- |----|-----------|
304
- |`Int32`|The remainder of its operands|
305
-
306
- ### Int32.**mod**
303
+ ### Int32.**(%)**
307
304
 
308
- <details disabled>
309
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
310
- No other changes yet.
305
+ <details>
306
+ <summary>Added in <code>0.6.0</code></summary>
307
+ <table>
308
+ <thead>
309
+ <tr><th>version</th><th>changes</th></tr>
310
+ </thead>
311
+ <tbody>
312
+ <tr><td><code>0.2.0</code></td><td>Originally named `mod`</td></tr>
313
+ </tbody>
314
+ </table>
311
315
  </details>
312
316
 
313
317
  ```grain
314
- mod : (Int32, Int32) -> Int32
318
+ (%) : (x: Int32, y: Int32) => Int32
315
319
  ```
316
320
 
317
321
  Computes the remainder of the division of the first operand by the second.
@@ -336,10 +340,6 @@ Throws:
336
340
 
337
341
  * When `y` is zero
338
342
 
339
- ## Bitwise operations
340
-
341
- Functions for operating on bits of Int32 values.
342
-
343
343
  ### Int32.**rotl**
344
344
 
345
345
  <details disabled>
@@ -348,7 +348,7 @@ No other changes yet.
348
348
  </details>
349
349
 
350
350
  ```grain
351
- rotl : (Int32, Int32) -> Int32
351
+ rotl : (value: Int32, amount: Int32) => Int32
352
352
  ```
353
353
 
354
354
  Rotates the bits of the value left by the given number of bits.
@@ -374,7 +374,7 @@ No other changes yet.
374
374
  </details>
375
375
 
376
376
  ```grain
377
- rotr : (Int32, Int32) -> Int32
377
+ rotr : (value: Int32, amount: Int32) => Int32
378
378
  ```
379
379
 
380
380
  Rotates the bits of the value right by the given number of bits.
@@ -392,15 +392,22 @@ Returns:
392
392
  |----|-----------|
393
393
  |`Int32`|The rotated value|
394
394
 
395
- ### Int32.**shl**
395
+ ### Int32.**(<<)**
396
396
 
397
- <details disabled>
398
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
399
- No other changes yet.
397
+ <details>
398
+ <summary>Added in <code>0.6.0</code></summary>
399
+ <table>
400
+ <thead>
401
+ <tr><th>version</th><th>changes</th></tr>
402
+ </thead>
403
+ <tbody>
404
+ <tr><td><code>0.2.0</code></td><td>Originally named `shl`</td></tr>
405
+ </tbody>
406
+ </table>
400
407
  </details>
401
408
 
402
409
  ```grain
403
- shl : (Int32, Int32) -> Int32
410
+ (<<) : (value: Int32, amount: Int32) => Int32
404
411
  ```
405
412
 
406
413
  Shifts the bits of the value left by the given number of bits.
@@ -418,15 +425,22 @@ Returns:
418
425
  |----|-----------|
419
426
  |`Int32`|The shifted value|
420
427
 
421
- ### Int32.**shr**
428
+ ### Int32.**(>>)**
422
429
 
423
- <details disabled>
424
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
425
- No other changes yet.
430
+ <details>
431
+ <summary>Added in <code>0.6.0</code></summary>
432
+ <table>
433
+ <thead>
434
+ <tr><th>version</th><th>changes</th></tr>
435
+ </thead>
436
+ <tbody>
437
+ <tr><td><code>0.2.0</code></td><td>Originally named `shr`</td></tr>
438
+ </tbody>
439
+ </table>
426
440
  </details>
427
441
 
428
442
  ```grain
429
- shr : (Int32, Int32) -> Int32
443
+ (>>) : (value: Int32, amount: Int32) => Int32
430
444
  ```
431
445
 
432
446
  Shifts the bits of the value right by the given number of bits, preserving the sign bit.
@@ -444,45 +458,22 @@ Returns:
444
458
  |----|-----------|
445
459
  |`Int32`|The shifted value|
446
460
 
447
- ### Int32.**shrU**
461
+ ### Int32.**(==)**
448
462
 
449
- <details disabled>
450
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
451
- No other changes yet.
463
+ <details>
464
+ <summary>Added in <code>0.6.0</code></summary>
465
+ <table>
466
+ <thead>
467
+ <tr><th>version</th><th>changes</th></tr>
468
+ </thead>
469
+ <tbody>
470
+ <tr><td><code>0.4.0</code></td><td>Originally named `eq`</td></tr>
471
+ </tbody>
472
+ </table>
452
473
  </details>
453
474
 
454
475
  ```grain
455
- shrU : (Int32, Int32) -> Int32
456
- ```
457
-
458
- Shifts the bits of the value right by the given number of bits.
459
-
460
- Parameters:
461
-
462
- |param|type|description|
463
- |-----|----|-----------|
464
- |`value`|`Int32`|The value to shift|
465
- |`amount`|`Int32`|The amount to shift by|
466
-
467
- Returns:
468
-
469
- |type|description|
470
- |----|-----------|
471
- |`Int32`|The shifted value|
472
-
473
- ## Comparisons
474
-
475
- Functions for comparing Int32 values.
476
-
477
- ### Int32.**eq**
478
-
479
- <details disabled>
480
- <summary tabindex="-1">Added in <code>0.4.0</code></summary>
481
- No other changes yet.
482
- </details>
483
-
484
- ```grain
485
- eq : (Int32, Int32) -> Bool
476
+ (==) : (x: Int32, y: Int32) => Bool
486
477
  ```
487
478
 
488
479
  Checks if the first value is equal to the second value.
@@ -500,15 +491,22 @@ Returns:
500
491
  |----|-----------|
501
492
  |`Bool`|`true` if the first value is equal to the second value or `false` otherwise|
502
493
 
503
- ### Int32.**ne**
494
+ ### Int32.**(!=)**
504
495
 
505
- <details disabled>
506
- <summary tabindex="-1">Added in <code>0.4.0</code></summary>
507
- No other changes yet.
496
+ <details>
497
+ <summary>Added in <code>0.6.0</code></summary>
498
+ <table>
499
+ <thead>
500
+ <tr><th>version</th><th>changes</th></tr>
501
+ </thead>
502
+ <tbody>
503
+ <tr><td><code>0.4.0</code></td><td>Originally named `ne`</td></tr>
504
+ </tbody>
505
+ </table>
508
506
  </details>
509
507
 
510
508
  ```grain
511
- ne : (Int32, Int32) -> Bool
509
+ (!=) : (x: Int32, y: Int32) => Bool
512
510
  ```
513
511
 
514
512
  Checks if the first value is not equal to the second value.
@@ -534,7 +532,7 @@ No other changes yet.
534
532
  </details>
535
533
 
536
534
  ```grain
537
- eqz : Int32 -> Bool
535
+ eqz : (value: Int32) => Bool
538
536
  ```
539
537
 
540
538
  Checks if the given value is equal to zero.
@@ -551,15 +549,22 @@ Returns:
551
549
  |----|-----------|
552
550
  |`Bool`|`true` if the first value is equal to zero or `false` otherwise|
553
551
 
554
- ### Int32.**lt**
552
+ ### Int32.**(<)**
555
553
 
556
- <details disabled>
557
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
558
- No other changes yet.
554
+ <details>
555
+ <summary>Added in <code>0.6.0</code></summary>
556
+ <table>
557
+ <thead>
558
+ <tr><th>version</th><th>changes</th></tr>
559
+ </thead>
560
+ <tbody>
561
+ <tr><td><code>0.2.0</code></td><td>Originally named `lt`</td></tr>
562
+ </tbody>
563
+ </table>
559
564
  </details>
560
565
 
561
566
  ```grain
562
- lt : (Int32, Int32) -> Bool
567
+ (<) : (x: Int32, y: Int32) => Bool
563
568
  ```
564
569
 
565
570
  Checks if the first value is less than the second value.
@@ -577,41 +582,22 @@ Returns:
577
582
  |----|-----------|
578
583
  |`Bool`|`true` if the first value is less than the second value or `false` otherwise|
579
584
 
580
- ### Int32.**ltU**
585
+ ### Int32.**(>)**
581
586
 
582
- <details disabled>
583
- <summary tabindex="-1">Added in <code>0.5.0</code></summary>
584
- No other changes yet.
587
+ <details>
588
+ <summary>Added in <code>0.6.0</code></summary>
589
+ <table>
590
+ <thead>
591
+ <tr><th>version</th><th>changes</th></tr>
592
+ </thead>
593
+ <tbody>
594
+ <tr><td><code>0.2.0</code></td><td>Originally named `gt`</td></tr>
595
+ </tbody>
596
+ </table>
585
597
  </details>
586
598
 
587
599
  ```grain
588
- ltU : (Int32, Int32) -> Bool
589
- ```
590
-
591
- Checks if the first unsigned value is less than the second unsigned value.
592
-
593
- Parameters:
594
-
595
- |param|type|description|
596
- |-----|----|-----------|
597
- |`x`|`Int32`|The first value|
598
- |`y`|`Int32`|The second value|
599
-
600
- Returns:
601
-
602
- |type|description|
603
- |----|-----------|
604
- |`Bool`|`true` if the first value is less than the second value or `false` otherwise|
605
-
606
- ### Int32.**gt**
607
-
608
- <details disabled>
609
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
610
- No other changes yet.
611
- </details>
612
-
613
- ```grain
614
- gt : (Int32, Int32) -> Bool
600
+ (>) : (x: Int32, y: Int32) => Bool
615
601
  ```
616
602
 
617
603
  Checks if the first value is greater than the second value.
@@ -629,41 +615,22 @@ Returns:
629
615
  |----|-----------|
630
616
  |`Bool`|`true` if the first value is greater than the second value or `false` otherwise|
631
617
 
632
- ### Int32.**gtU**
618
+ ### Int32.**(<=)**
633
619
 
634
- <details disabled>
635
- <summary tabindex="-1">Added in <code>0.5.0</code></summary>
636
- No other changes yet.
620
+ <details>
621
+ <summary>Added in <code>0.6.0</code></summary>
622
+ <table>
623
+ <thead>
624
+ <tr><th>version</th><th>changes</th></tr>
625
+ </thead>
626
+ <tbody>
627
+ <tr><td><code>0.2.0</code></td><td>Originally named `lte`</td></tr>
628
+ </tbody>
629
+ </table>
637
630
  </details>
638
631
 
639
632
  ```grain
640
- gtU : (Int32, Int32) -> Bool
641
- ```
642
-
643
- Checks if the first unsigned value is greater than the second unsigned value.
644
-
645
- Parameters:
646
-
647
- |param|type|description|
648
- |-----|----|-----------|
649
- |`x`|`Int32`|The first value|
650
- |`y`|`Int32`|The second value|
651
-
652
- Returns:
653
-
654
- |type|description|
655
- |----|-----------|
656
- |`Bool`|`true` if the first value is greater than the second value or `false` otherwise|
657
-
658
- ### Int32.**lte**
659
-
660
- <details disabled>
661
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
662
- No other changes yet.
663
- </details>
664
-
665
- ```grain
666
- lte : (Int32, Int32) -> Bool
633
+ (<=) : (x: Int32, y: Int32) => Bool
667
634
  ```
668
635
 
669
636
  Checks if the first value is less than or equal to the second value.
@@ -681,41 +648,22 @@ Returns:
681
648
  |----|-----------|
682
649
  |`Bool`|`true` if the first value is less than or equal to the second value or `false` otherwise|
683
650
 
684
- ### Int32.**lteU**
651
+ ### Int32.**(>=)**
685
652
 
686
- <details disabled>
687
- <summary tabindex="-1">Added in <code>0.5.0</code></summary>
688
- No other changes yet.
653
+ <details>
654
+ <summary>Added in <code>0.6.0</code></summary>
655
+ <table>
656
+ <thead>
657
+ <tr><th>version</th><th>changes</th></tr>
658
+ </thead>
659
+ <tbody>
660
+ <tr><td><code>0.2.0</code></td><td>Originally named `gte`</td></tr>
661
+ </tbody>
662
+ </table>
689
663
  </details>
690
664
 
691
665
  ```grain
692
- lteU : (Int32, Int32) -> Bool
693
- ```
694
-
695
- Checks if the first unsigned value is less than or equal to the second unsigned value.
696
-
697
- Parameters:
698
-
699
- |param|type|description|
700
- |-----|----|-----------|
701
- |`x`|`Int32`|The first value|
702
- |`y`|`Int32`|The second value|
703
-
704
- Returns:
705
-
706
- |type|description|
707
- |----|-----------|
708
- |`Bool`|`true` if the first value is less than or equal to the second value or `false` otherwise|
709
-
710
- ### Int32.**gte**
711
-
712
- <details disabled>
713
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
714
- No other changes yet.
715
- </details>
716
-
717
- ```grain
718
- gte : (Int32, Int32) -> Bool
666
+ (>=) : (x: Int32, y: Int32) => Bool
719
667
  ```
720
668
 
721
669
  Checks if the first value is greater than or equal to the second value.
@@ -733,36 +681,6 @@ Returns:
733
681
  |----|-----------|
734
682
  |`Bool`|`true` if the first value is greater than or equal to the second value or `false` otherwise|
735
683
 
736
- ### Int32.**gteU**
737
-
738
- <details disabled>
739
- <summary tabindex="-1">Added in <code>0.5.0</code></summary>
740
- No other changes yet.
741
- </details>
742
-
743
- ```grain
744
- gteU : (Int32, Int32) -> Bool
745
- ```
746
-
747
- Checks if the first unsigned value is greater than or equal to the second unsigned value.
748
-
749
- Parameters:
750
-
751
- |param|type|description|
752
- |-----|----|-----------|
753
- |`x`|`Int32`|The first value|
754
- |`y`|`Int32`|The second value|
755
-
756
- Returns:
757
-
758
- |type|description|
759
- |----|-----------|
760
- |`Bool`|`true` if the first value is greater than or equal to the second value or `false` otherwise|
761
-
762
- ## Bitwise logic
763
-
764
- Boolean operations on the bits of Int32 values.
765
-
766
684
  ### Int32.**lnot**
767
685
 
768
686
  <details disabled>
@@ -771,7 +689,7 @@ No other changes yet.
771
689
  </details>
772
690
 
773
691
  ```grain
774
- lnot : Int32 -> Int32
692
+ lnot : (value: Int32) => Int32
775
693
  ```
776
694
 
777
695
  Computes the bitwise NOT of the given value.
@@ -788,15 +706,22 @@ Returns:
788
706
  |----|-----------|
789
707
  |`Int32`|Containing the inverted bits of the given value|
790
708
 
791
- ### Int32.**land**
709
+ ### Int32.**(&)**
792
710
 
793
- <details disabled>
794
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
795
- No other changes yet.
711
+ <details>
712
+ <summary>Added in <code>0.6.0</code></summary>
713
+ <table>
714
+ <thead>
715
+ <tr><th>version</th><th>changes</th></tr>
716
+ </thead>
717
+ <tbody>
718
+ <tr><td><code>0.2.0</code></td><td>Originally named `land`</td></tr>
719
+ </tbody>
720
+ </table>
796
721
  </details>
797
722
 
798
723
  ```grain
799
- land : (Int32, Int32) -> Int32
724
+ (&) : (x: Int32, y: Int32) => Int32
800
725
  ```
801
726
 
802
727
  Computes the bitwise AND (`&`) on the given operands.
@@ -814,15 +739,22 @@ Returns:
814
739
  |----|-----------|
815
740
  |`Int32`|Containing a `1` in each bit position for which the corresponding bits of both operands are `1`|
816
741
 
817
- ### Int32.**lor**
742
+ ### Int32.**(|)**
818
743
 
819
- <details disabled>
820
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
821
- No other changes yet.
744
+ <details>
745
+ <summary>Added in <code>0.6.0</code></summary>
746
+ <table>
747
+ <thead>
748
+ <tr><th>version</th><th>changes</th></tr>
749
+ </thead>
750
+ <tbody>
751
+ <tr><td><code>0.2.0</code></td><td>Originally named `lor`</td></tr>
752
+ </tbody>
753
+ </table>
822
754
  </details>
823
755
 
824
756
  ```grain
825
- lor : (Int32, Int32) -> Int32
757
+ (|) : (x: Int32, y: Int32) => Int32
826
758
  ```
827
759
 
828
760
  Computes the bitwise OR (`|`) on the given operands.
@@ -840,15 +772,22 @@ Returns:
840
772
  |----|-----------|
841
773
  |`Int32`|Containing a `1` in each bit position for which the corresponding bits of either or both operands are `1`|
842
774
 
843
- ### Int32.**lxor**
775
+ ### Int32.**(^)**
844
776
 
845
- <details disabled>
846
- <summary tabindex="-1">Added in <code>0.2.0</code></summary>
847
- No other changes yet.
777
+ <details>
778
+ <summary>Added in <code>0.6.0</code></summary>
779
+ <table>
780
+ <thead>
781
+ <tr><th>version</th><th>changes</th></tr>
782
+ </thead>
783
+ <tbody>
784
+ <tr><td><code>0.2.0</code></td><td>Originally named `lxor`</td></tr>
785
+ </tbody>
786
+ </table>
848
787
  </details>
849
788
 
850
789
  ```grain
851
- lxor : (Int32, Int32) -> Int32
790
+ (^) : (x: Int32, y: Int32) => Int32
852
791
  ```
853
792
 
854
793
  Computes the bitwise XOR (`^`) on the given operands.
@@ -874,7 +813,7 @@ No other changes yet.
874
813
  </details>
875
814
 
876
815
  ```grain
877
- clz : Int32 -> Int32
816
+ clz : (value: Int32) => Int32
878
817
  ```
879
818
 
880
819
  Counts the number of leading zero bits in the value.
@@ -899,7 +838,7 @@ No other changes yet.
899
838
  </details>
900
839
 
901
840
  ```grain
902
- ctz : Int32 -> Int32
841
+ ctz : (value: Int32) => Int32
903
842
  ```
904
843
 
905
844
  Counts the number of trailing zero bits in the value.
@@ -924,7 +863,7 @@ No other changes yet.
924
863
  </details>
925
864
 
926
865
  ```grain
927
- popcnt : Int32 -> Int32
866
+ popcnt : (value: Int32) => Int32
928
867
  ```
929
868
 
930
869
  Counts the number of bits set to `1` in the value, also known as a population count.
@@ -941,3 +880,29 @@ Returns:
941
880
  |----|-----------|
942
881
  |`Int32`|The amount of 1-bits in its operand|
943
882
 
883
+ ### Int32.**(\*\*)**
884
+
885
+ <details disabled>
886
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
887
+ No other changes yet.
888
+ </details>
889
+
890
+ ```grain
891
+ (**) : (base: Int32, power: Int32) => Int32
892
+ ```
893
+
894
+ Computes the exponentiation of the given base and power.
895
+
896
+ Parameters:
897
+
898
+ |param|type|description|
899
+ |-----|----|-----------|
900
+ |`base`|`Int32`|The base number|
901
+ |`power`|`Int32`|The exponent number|
902
+
903
+ Returns:
904
+
905
+ |type|description|
906
+ |----|-----------|
907
+ |`Int32`|The base raised to the given power|
908
+