@grain/stdlib 0.6.6 → 0.7.1

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 (137) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/LICENSE +1 -1
  3. package/README.md +2 -2
  4. package/array.gr +55 -7
  5. package/array.md +606 -560
  6. package/bigint.md +228 -228
  7. package/buffer.gr +85 -53
  8. package/buffer.md +442 -319
  9. package/bytes.gr +112 -35
  10. package/bytes.md +299 -219
  11. package/char.gr +201 -99
  12. package/char.md +447 -120
  13. package/exception.gr +11 -11
  14. package/exception.md +29 -4
  15. package/float32.gr +327 -3
  16. package/float32.md +698 -111
  17. package/float64.gr +320 -3
  18. package/float64.md +698 -111
  19. package/fs.gr +1082 -0
  20. package/fs.md +630 -0
  21. package/hash.gr +142 -88
  22. package/hash.md +105 -17
  23. package/int16.md +178 -178
  24. package/int32.gr +26 -5
  25. package/int32.md +266 -231
  26. package/int64.gr +27 -2
  27. package/int64.md +266 -231
  28. package/int8.md +178 -178
  29. package/json.gr +366 -51
  30. package/json.md +431 -15
  31. package/list.gr +328 -31
  32. package/list.md +759 -336
  33. package/map.gr +20 -12
  34. package/map.md +266 -260
  35. package/marshal.gr +41 -40
  36. package/marshal.md +14 -14
  37. package/number.gr +278 -35
  38. package/number.md +688 -269
  39. package/option.md +162 -162
  40. package/package.json +5 -3
  41. package/path.gr +48 -0
  42. package/path.md +180 -89
  43. package/pervasives.gr +2 -2
  44. package/pervasives.md +275 -275
  45. package/priorityqueue.gr +7 -7
  46. package/priorityqueue.md +131 -131
  47. package/queue.gr +183 -29
  48. package/queue.md +404 -148
  49. package/random.md +43 -43
  50. package/range.gr +4 -4
  51. package/range.md +42 -42
  52. package/rational.md +123 -123
  53. package/regex.gr +52 -51
  54. package/regex.md +102 -102
  55. package/result.md +118 -118
  56. package/runtime/atof/common.md +39 -39
  57. package/runtime/atof/decimal.gr +6 -6
  58. package/runtime/atof/decimal.md +14 -14
  59. package/runtime/atof/lemire.gr +5 -5
  60. package/runtime/atof/lemire.md +1 -1
  61. package/runtime/atof/parse.gr +16 -16
  62. package/runtime/atof/parse.md +2 -2
  63. package/runtime/atof/slow.md +1 -1
  64. package/runtime/atof/table.md +2 -2
  65. package/runtime/atoi/parse.gr +3 -3
  66. package/runtime/atoi/parse.md +1 -1
  67. package/runtime/bigint.gr +15 -47
  68. package/runtime/bigint.md +54 -60
  69. package/runtime/compare.gr +2 -2
  70. package/runtime/compare.md +8 -8
  71. package/runtime/dataStructures.md +211 -211
  72. package/runtime/debugPrint.gr +4 -1
  73. package/runtime/debugPrint.md +9 -9
  74. package/runtime/equal.gr +99 -77
  75. package/runtime/equal.md +8 -8
  76. package/runtime/exception.gr +62 -82
  77. package/runtime/exception.md +62 -11
  78. package/runtime/gc.gr +39 -45
  79. package/runtime/gc.md +4 -4
  80. package/runtime/malloc.gr +7 -7
  81. package/runtime/malloc.md +13 -13
  82. package/runtime/math/kernel/cos.gr +70 -0
  83. package/runtime/math/kernel/cos.md +14 -0
  84. package/runtime/math/kernel/sin.gr +65 -0
  85. package/runtime/math/kernel/sin.md +14 -0
  86. package/runtime/math/kernel/tan.gr +136 -0
  87. package/runtime/math/kernel/tan.md +14 -0
  88. package/runtime/math/rempio2.gr +244 -0
  89. package/runtime/math/rempio2.md +14 -0
  90. package/runtime/math/trig.gr +130 -0
  91. package/runtime/math/trig.md +28 -0
  92. package/runtime/math/umuldi.gr +26 -0
  93. package/runtime/math/umuldi.md +14 -0
  94. package/runtime/numberUtils.gr +29 -29
  95. package/runtime/numberUtils.md +12 -12
  96. package/runtime/numbers.gr +373 -381
  97. package/runtime/numbers.md +348 -342
  98. package/runtime/string.gr +37 -105
  99. package/runtime/string.md +20 -26
  100. package/runtime/unsafe/constants.md +24 -24
  101. package/runtime/unsafe/conv.md +19 -19
  102. package/runtime/unsafe/memory.gr +24 -20
  103. package/runtime/unsafe/memory.md +27 -7
  104. package/runtime/unsafe/offsets.gr +36 -0
  105. package/runtime/unsafe/offsets.md +88 -0
  106. package/runtime/unsafe/panic.gr +28 -0
  107. package/runtime/unsafe/panic.md +14 -0
  108. package/runtime/unsafe/tags.md +32 -32
  109. package/runtime/unsafe/wasmf32.md +28 -28
  110. package/runtime/unsafe/wasmf64.md +28 -28
  111. package/runtime/unsafe/wasmi32.md +47 -47
  112. package/runtime/unsafe/wasmi64.md +50 -50
  113. package/runtime/utf8.gr +189 -0
  114. package/runtime/utf8.md +117 -0
  115. package/runtime/wasi.gr +4 -2
  116. package/runtime/wasi.md +147 -147
  117. package/set.gr +18 -11
  118. package/set.md +253 -247
  119. package/stack.gr +171 -2
  120. package/stack.md +371 -89
  121. package/string.gr +352 -557
  122. package/string.md +298 -255
  123. package/uint16.md +170 -170
  124. package/uint32.gr +25 -4
  125. package/uint32.md +249 -214
  126. package/uint64.gr +25 -5
  127. package/uint64.md +249 -214
  128. package/uint8.md +170 -170
  129. package/uri.gr +57 -53
  130. package/uri.md +88 -89
  131. package/wasi/file.gr +67 -59
  132. package/wasi/file.md +308 -308
  133. package/wasi/process.md +26 -26
  134. package/wasi/random.md +12 -12
  135. package/wasi/time.md +16 -16
  136. package/runtime/utils/printing.gr +0 -60
  137. package/runtime/utils/printing.md +0 -26
package/uint32.md CHANGED
@@ -25,22 +25,22 @@ No other changes yet.
25
25
  </details>
26
26
 
27
27
  ```grain
28
- fromNumber : (number: Number) => Uint32
28
+ fromNumber: (number: Number) => Uint32
29
29
  ```
30
30
 
31
31
  Converts a Number to a Uint32.
32
32
 
33
33
  Parameters:
34
34
 
35
- |param|type|description|
36
- |-----|----|-----------|
37
- |`number`|`Number`|The value to convert|
35
+ | param | type | description |
36
+ | -------- | -------- | -------------------- |
37
+ | `number` | `Number` | The value to convert |
38
38
 
39
39
  Returns:
40
40
 
41
- |type|description|
42
- |----|-----------|
43
- |`Uint32`|The Number represented as a Uint32|
41
+ | type | description |
42
+ | -------- | ---------------------------------- |
43
+ | `Uint32` | The Number represented as a Uint32 |
44
44
 
45
45
  ### Uint32.**toNumber**
46
46
 
@@ -50,22 +50,22 @@ No other changes yet.
50
50
  </details>
51
51
 
52
52
  ```grain
53
- toNumber : (value: Uint32) => Number
53
+ toNumber: (value: Uint32) => Number
54
54
  ```
55
55
 
56
56
  Converts a Uint32 to a Number.
57
57
 
58
58
  Parameters:
59
59
 
60
- |param|type|description|
61
- |-----|----|-----------|
62
- |`value`|`Uint32`|The value to convert|
60
+ | param | type | description |
61
+ | ------- | -------- | -------------------- |
62
+ | `value` | `Uint32` | The value to convert |
63
63
 
64
64
  Returns:
65
65
 
66
- |type|description|
67
- |----|-----------|
68
- |`Number`|The Uint32 represented as a Number|
66
+ | type | description |
67
+ | -------- | ---------------------------------- |
68
+ | `Number` | The Uint32 represented as a Number |
69
69
 
70
70
  ### Uint32.**fromInt32**
71
71
 
@@ -75,22 +75,57 @@ No other changes yet.
75
75
  </details>
76
76
 
77
77
  ```grain
78
- fromInt32 : (number: Int32) => Uint32
78
+ fromInt32: (number: Int32) => Uint32
79
79
  ```
80
80
 
81
81
  Converts an Int32 to a Uint32.
82
82
 
83
83
  Parameters:
84
84
 
85
- |param|type|description|
86
- |-----|----|-----------|
87
- |`number`|`Int32`|The value to convert|
85
+ | param | type | description |
86
+ | -------- | ------- | -------------------- |
87
+ | `number` | `Int32` | The value to convert |
88
88
 
89
89
  Returns:
90
90
 
91
- |type|description|
92
- |----|-----------|
93
- |`Uint32`|The Int32 represented as a Uint32|
91
+ | type | description |
92
+ | -------- | --------------------------------- |
93
+ | `Uint32` | The Int32 represented as a Uint32 |
94
+
95
+ ### Uint32.**reinterpretFloat32**
96
+
97
+ <details disabled>
98
+ <summary tabindex="-1">Added in <code>0.7.0</code></summary>
99
+ No other changes yet.
100
+ </details>
101
+
102
+ ```grain
103
+ reinterpretFloat32: (value: Float32) => Uint32
104
+ ```
105
+
106
+ Interprets a Float32 as an Uint32.
107
+
108
+ Parameters:
109
+
110
+ | param | type | description |
111
+ | ------- | --------- | -------------------- |
112
+ | `value` | `Float32` | The value to convert |
113
+
114
+ Returns:
115
+
116
+ | type | description |
117
+ | -------- | ------------------------------------ |
118
+ | `Uint32` | The Float32 interpreted as an Uint32 |
119
+
120
+ Examples:
121
+
122
+ ```grain
123
+ assert Uint32.reinterpretFloat32(1.0f) == 1065353216ul
124
+ ```
125
+
126
+ ```grain
127
+ assert Uint32.reinterpretFloat32(-1.0f) == 3212836864ul
128
+ ```
94
129
 
95
130
  ### Uint32.**incr**
96
131
 
@@ -100,22 +135,22 @@ No other changes yet.
100
135
  </details>
101
136
 
102
137
  ```grain
103
- incr : (value: Uint32) => Uint32
138
+ incr: (value: Uint32) => Uint32
104
139
  ```
105
140
 
106
141
  Increments the value by one.
107
142
 
108
143
  Parameters:
109
144
 
110
- |param|type|description|
111
- |-----|----|-----------|
112
- |`value`|`Uint32`|The value to increment|
145
+ | param | type | description |
146
+ | ------- | -------- | ---------------------- |
147
+ | `value` | `Uint32` | The value to increment |
113
148
 
114
149
  Returns:
115
150
 
116
- |type|description|
117
- |----|-----------|
118
- |`Uint32`|The incremented value|
151
+ | type | description |
152
+ | -------- | --------------------- |
153
+ | `Uint32` | The incremented value |
119
154
 
120
155
  ### Uint32.**decr**
121
156
 
@@ -125,22 +160,22 @@ No other changes yet.
125
160
  </details>
126
161
 
127
162
  ```grain
128
- decr : (value: Uint32) => Uint32
163
+ decr: (value: Uint32) => Uint32
129
164
  ```
130
165
 
131
166
  Decrements the value by one.
132
167
 
133
168
  Parameters:
134
169
 
135
- |param|type|description|
136
- |-----|----|-----------|
137
- |`value`|`Uint32`|The value to decrement|
170
+ | param | type | description |
171
+ | ------- | -------- | ---------------------- |
172
+ | `value` | `Uint32` | The value to decrement |
138
173
 
139
174
  Returns:
140
175
 
141
- |type|description|
142
- |----|-----------|
143
- |`Uint32`|The decremented value|
176
+ | type | description |
177
+ | -------- | --------------------- |
178
+ | `Uint32` | The decremented value |
144
179
 
145
180
  ### Uint32.**(+)**
146
181
 
@@ -150,23 +185,23 @@ No other changes yet.
150
185
  </details>
151
186
 
152
187
  ```grain
153
- (+) : (x: Uint32, y: Uint32) => Uint32
188
+ (+): (x: Uint32, y: Uint32) => Uint32
154
189
  ```
155
190
 
156
191
  Computes the sum of its operands.
157
192
 
158
193
  Parameters:
159
194
 
160
- |param|type|description|
161
- |-----|----|-----------|
162
- |`x`|`Uint32`|The first operand|
163
- |`y`|`Uint32`|The second operand|
195
+ | param | type | description |
196
+ | ----- | -------- | ------------------ |
197
+ | `x` | `Uint32` | The first operand |
198
+ | `y` | `Uint32` | The second operand |
164
199
 
165
200
  Returns:
166
201
 
167
- |type|description|
168
- |----|-----------|
169
- |`Uint32`|The sum of the two operands|
202
+ | type | description |
203
+ | -------- | --------------------------- |
204
+ | `Uint32` | The sum of the two operands |
170
205
 
171
206
  ### Uint32.**(-)**
172
207
 
@@ -176,23 +211,23 @@ No other changes yet.
176
211
  </details>
177
212
 
178
213
  ```grain
179
- (-) : (x: Uint32, y: Uint32) => Uint32
214
+ (-): (x: Uint32, y: Uint32) => Uint32
180
215
  ```
181
216
 
182
217
  Computes the difference of its operands.
183
218
 
184
219
  Parameters:
185
220
 
186
- |param|type|description|
187
- |-----|----|-----------|
188
- |`x`|`Uint32`|The first operand|
189
- |`y`|`Uint32`|The second operand|
221
+ | param | type | description |
222
+ | ----- | -------- | ------------------ |
223
+ | `x` | `Uint32` | The first operand |
224
+ | `y` | `Uint32` | The second operand |
190
225
 
191
226
  Returns:
192
227
 
193
- |type|description|
194
- |----|-----------|
195
- |`Uint32`|The difference of the two operands|
228
+ | type | description |
229
+ | -------- | ---------------------------------- |
230
+ | `Uint32` | The difference of the two operands |
196
231
 
197
232
  ### Uint32.**(*)**
198
233
 
@@ -202,23 +237,23 @@ No other changes yet.
202
237
  </details>
203
238
 
204
239
  ```grain
205
- (*) : (x: Uint32, y: Uint32) => Uint32
240
+ (*): (x: Uint32, y: Uint32) => Uint32
206
241
  ```
207
242
 
208
243
  Computes the product of its operands.
209
244
 
210
245
  Parameters:
211
246
 
212
- |param|type|description|
213
- |-----|----|-----------|
214
- |`x`|`Uint32`|The first operand|
215
- |`y`|`Uint32`|The second operand|
247
+ | param | type | description |
248
+ | ----- | -------- | ------------------ |
249
+ | `x` | `Uint32` | The first operand |
250
+ | `y` | `Uint32` | The second operand |
216
251
 
217
252
  Returns:
218
253
 
219
- |type|description|
220
- |----|-----------|
221
- |`Uint32`|The product of the two operands|
254
+ | type | description |
255
+ | -------- | ------------------------------- |
256
+ | `Uint32` | The product of the two operands |
222
257
 
223
258
  ### Uint32.**(/)**
224
259
 
@@ -228,23 +263,23 @@ No other changes yet.
228
263
  </details>
229
264
 
230
265
  ```grain
231
- (/) : (x: Uint32, y: Uint32) => Uint32
266
+ (/): (x: Uint32, y: Uint32) => Uint32
232
267
  ```
233
268
 
234
269
  Computes the quotient of its operands.
235
270
 
236
271
  Parameters:
237
272
 
238
- |param|type|description|
239
- |-----|----|-----------|
240
- |`x`|`Uint32`|The first operand|
241
- |`y`|`Uint32`|The second operand|
273
+ | param | type | description |
274
+ | ----- | -------- | ------------------ |
275
+ | `x` | `Uint32` | The first operand |
276
+ | `y` | `Uint32` | The second operand |
242
277
 
243
278
  Returns:
244
279
 
245
- |type|description|
246
- |----|-----------|
247
- |`Uint32`|The quotient of its operands|
280
+ | type | description |
281
+ | -------- | ---------------------------- |
282
+ | `Uint32` | The quotient of its operands |
248
283
 
249
284
  ### Uint32.**rem**
250
285
 
@@ -254,23 +289,23 @@ No other changes yet.
254
289
  </details>
255
290
 
256
291
  ```grain
257
- rem : (x: Uint32, y: Uint32) => Uint32
292
+ rem: (x: Uint32, y: Uint32) => Uint32
258
293
  ```
259
294
 
260
295
  Computes the remainder of the division of its operands.
261
296
 
262
297
  Parameters:
263
298
 
264
- |param|type|description|
265
- |-----|----|-----------|
266
- |`x`|`Uint32`|The first operand|
267
- |`y`|`Uint32`|The second operand|
299
+ | param | type | description |
300
+ | ----- | -------- | ------------------ |
301
+ | `x` | `Uint32` | The first operand |
302
+ | `y` | `Uint32` | The second operand |
268
303
 
269
304
  Returns:
270
305
 
271
- |type|description|
272
- |----|-----------|
273
- |`Uint32`|The remainder of its operands|
306
+ | type | description |
307
+ | -------- | ----------------------------- |
308
+ | `Uint32` | The remainder of its operands |
274
309
 
275
310
  ### Uint32.**rotl**
276
311
 
@@ -280,23 +315,23 @@ No other changes yet.
280
315
  </details>
281
316
 
282
317
  ```grain
283
- rotl : (value: Uint32, amount: Uint32) => Uint32
318
+ rotl: (value: Uint32, amount: Uint32) => Uint32
284
319
  ```
285
320
 
286
321
  Rotates the bits of the value left by the given number of bits.
287
322
 
288
323
  Parameters:
289
324
 
290
- |param|type|description|
291
- |-----|----|-----------|
292
- |`value`|`Uint32`|The value to rotate|
293
- |`amount`|`Uint32`|The number of bits to rotate by|
325
+ | param | type | description |
326
+ | -------- | -------- | ------------------------------- |
327
+ | `value` | `Uint32` | The value to rotate |
328
+ | `amount` | `Uint32` | The number of bits to rotate by |
294
329
 
295
330
  Returns:
296
331
 
297
- |type|description|
298
- |----|-----------|
299
- |`Uint32`|The rotated value|
332
+ | type | description |
333
+ | -------- | ----------------- |
334
+ | `Uint32` | The rotated value |
300
335
 
301
336
  ### Uint32.**rotr**
302
337
 
@@ -306,23 +341,23 @@ No other changes yet.
306
341
  </details>
307
342
 
308
343
  ```grain
309
- rotr : (value: Uint32, amount: Uint32) => Uint32
344
+ rotr: (value: Uint32, amount: Uint32) => Uint32
310
345
  ```
311
346
 
312
347
  Rotates the bits of the value right by the given number of bits.
313
348
 
314
349
  Parameters:
315
350
 
316
- |param|type|description|
317
- |-----|----|-----------|
318
- |`value`|`Uint32`|The value to rotate|
319
- |`amount`|`Uint32`|The number of bits to rotate by|
351
+ | param | type | description |
352
+ | -------- | -------- | ------------------------------- |
353
+ | `value` | `Uint32` | The value to rotate |
354
+ | `amount` | `Uint32` | The number of bits to rotate by |
320
355
 
321
356
  Returns:
322
357
 
323
- |type|description|
324
- |----|-----------|
325
- |`Uint32`|The rotated value|
358
+ | type | description |
359
+ | -------- | ----------------- |
360
+ | `Uint32` | The rotated value |
326
361
 
327
362
  ### Uint32.**(<<)**
328
363
 
@@ -332,23 +367,23 @@ No other changes yet.
332
367
  </details>
333
368
 
334
369
  ```grain
335
- (<<) : (value: Uint32, amount: Uint32) => Uint32
370
+ (<<): (value: Uint32, amount: Uint32) => Uint32
336
371
  ```
337
372
 
338
373
  Shifts the bits of the value left by the given number of bits.
339
374
 
340
375
  Parameters:
341
376
 
342
- |param|type|description|
343
- |-----|----|-----------|
344
- |`value`|`Uint32`|The value to shift|
345
- |`amount`|`Uint32`|The number of bits to shift by|
377
+ | param | type | description |
378
+ | -------- | -------- | ------------------------------ |
379
+ | `value` | `Uint32` | The value to shift |
380
+ | `amount` | `Uint32` | The number of bits to shift by |
346
381
 
347
382
  Returns:
348
383
 
349
- |type|description|
350
- |----|-----------|
351
- |`Uint32`|The shifted value|
384
+ | type | description |
385
+ | -------- | ----------------- |
386
+ | `Uint32` | The shifted value |
352
387
 
353
388
  ### Uint32.**(>>>)**
354
389
 
@@ -358,23 +393,23 @@ No other changes yet.
358
393
  </details>
359
394
 
360
395
  ```grain
361
- (>>>) : (value: Uint32, amount: Uint32) => Uint32
396
+ (>>>): (value: Uint32, amount: Uint32) => Uint32
362
397
  ```
363
398
 
364
399
  Shifts the bits of the value right by the given number of bits.
365
400
 
366
401
  Parameters:
367
402
 
368
- |param|type|description|
369
- |-----|----|-----------|
370
- |`value`|`Uint32`|The value to shift|
371
- |`amount`|`Uint32`|The amount to shift by|
403
+ | param | type | description |
404
+ | -------- | -------- | ---------------------- |
405
+ | `value` | `Uint32` | The value to shift |
406
+ | `amount` | `Uint32` | The amount to shift by |
372
407
 
373
408
  Returns:
374
409
 
375
- |type|description|
376
- |----|-----------|
377
- |`Uint32`|The shifted value|
410
+ | type | description |
411
+ | -------- | ----------------- |
412
+ | `Uint32` | The shifted value |
378
413
 
379
414
  ### Uint32.**(==)**
380
415
 
@@ -384,23 +419,23 @@ No other changes yet.
384
419
  </details>
385
420
 
386
421
  ```grain
387
- (==) : (x: Uint32, y: Uint32) => Bool
422
+ (==): (x: Uint32, y: Uint32) => Bool
388
423
  ```
389
424
 
390
425
  Checks if the first value is equal to the second value.
391
426
 
392
427
  Parameters:
393
428
 
394
- |param|type|description|
395
- |-----|----|-----------|
396
- |`x`|`Uint32`|The first value|
397
- |`y`|`Uint32`|The second value|
429
+ | param | type | description |
430
+ | ----- | -------- | ---------------- |
431
+ | `x` | `Uint32` | The first value |
432
+ | `y` | `Uint32` | The second value |
398
433
 
399
434
  Returns:
400
435
 
401
- |type|description|
402
- |----|-----------|
403
- |`Bool`|`true` if the first value is equal to the second value or `false` otherwise|
436
+ | type | description |
437
+ | ------ | --------------------------------------------------------------------------- |
438
+ | `Bool` | `true` if the first value is equal to the second value or `false` otherwise |
404
439
 
405
440
  ### Uint32.**(!=)**
406
441
 
@@ -410,23 +445,23 @@ No other changes yet.
410
445
  </details>
411
446
 
412
447
  ```grain
413
- (!=) : (x: Uint32, y: Uint32) => Bool
448
+ (!=): (x: Uint32, y: Uint32) => Bool
414
449
  ```
415
450
 
416
451
  Checks if the first value is not equal to the second value.
417
452
 
418
453
  Parameters:
419
454
 
420
- |param|type|description|
421
- |-----|----|-----------|
422
- |`x`|`Uint32`|The first value|
423
- |`y`|`Uint32`|The second value|
455
+ | param | type | description |
456
+ | ----- | -------- | ---------------- |
457
+ | `x` | `Uint32` | The first value |
458
+ | `y` | `Uint32` | The second value |
424
459
 
425
460
  Returns:
426
461
 
427
- |type|description|
428
- |----|-----------|
429
- |`Bool`|`true` if the first value is not equal to the second value or `false` otherwise|
462
+ | type | description |
463
+ | ------ | ------------------------------------------------------------------------------- |
464
+ | `Bool` | `true` if the first value is not equal to the second value or `false` otherwise |
430
465
 
431
466
  ### Uint32.**eqz**
432
467
 
@@ -436,22 +471,22 @@ No other changes yet.
436
471
  </details>
437
472
 
438
473
  ```grain
439
- eqz : (value: Uint32) => Bool
474
+ eqz: (value: Uint32) => Bool
440
475
  ```
441
476
 
442
477
  Checks if the given value is equal to zero.
443
478
 
444
479
  Parameters:
445
480
 
446
- |param|type|description|
447
- |-----|----|-----------|
448
- |`value`|`Uint32`|The value to inspect|
481
+ | param | type | description |
482
+ | ------- | -------- | -------------------- |
483
+ | `value` | `Uint32` | The value to inspect |
449
484
 
450
485
  Returns:
451
486
 
452
- |type|description|
453
- |----|-----------|
454
- |`Bool`|`true` if the first value is equal to zero or `false` otherwise|
487
+ | type | description |
488
+ | ------ | --------------------------------------------------------------- |
489
+ | `Bool` | `true` if the first value is equal to zero or `false` otherwise |
455
490
 
456
491
  ### Uint32.**(<)**
457
492
 
@@ -461,23 +496,23 @@ No other changes yet.
461
496
  </details>
462
497
 
463
498
  ```grain
464
- (<) : (x: Uint32, y: Uint32) => Bool
499
+ (<): (x: Uint32, y: Uint32) => Bool
465
500
  ```
466
501
 
467
502
  Checks if the first value is less than the second value.
468
503
 
469
504
  Parameters:
470
505
 
471
- |param|type|description|
472
- |-----|----|-----------|
473
- |`x`|`Uint32`|The first value|
474
- |`y`|`Uint32`|The second value|
506
+ | param | type | description |
507
+ | ----- | -------- | ---------------- |
508
+ | `x` | `Uint32` | The first value |
509
+ | `y` | `Uint32` | The second value |
475
510
 
476
511
  Returns:
477
512
 
478
- |type|description|
479
- |----|-----------|
480
- |`Bool`|`true` if the first value is less than the second value or `false` otherwise|
513
+ | type | description |
514
+ | ------ | ---------------------------------------------------------------------------- |
515
+ | `Bool` | `true` if the first value is less than the second value or `false` otherwise |
481
516
 
482
517
  ### Uint32.**(>)**
483
518
 
@@ -487,23 +522,23 @@ No other changes yet.
487
522
  </details>
488
523
 
489
524
  ```grain
490
- (>) : (x: Uint32, y: Uint32) => Bool
525
+ (>): (x: Uint32, y: Uint32) => Bool
491
526
  ```
492
527
 
493
528
  Checks if the first value is greater than the second value.
494
529
 
495
530
  Parameters:
496
531
 
497
- |param|type|description|
498
- |-----|----|-----------|
499
- |`x`|`Uint32`|The first value|
500
- |`y`|`Uint32`|The second value|
532
+ | param | type | description |
533
+ | ----- | -------- | ---------------- |
534
+ | `x` | `Uint32` | The first value |
535
+ | `y` | `Uint32` | The second value |
501
536
 
502
537
  Returns:
503
538
 
504
- |type|description|
505
- |----|-----------|
506
- |`Bool`|`true` if the first value is greater than the second value or `false` otherwise|
539
+ | type | description |
540
+ | ------ | ------------------------------------------------------------------------------- |
541
+ | `Bool` | `true` if the first value is greater than the second value or `false` otherwise |
507
542
 
508
543
  ### Uint32.**(<=)**
509
544
 
@@ -513,23 +548,23 @@ No other changes yet.
513
548
  </details>
514
549
 
515
550
  ```grain
516
- (<=) : (x: Uint32, y: Uint32) => Bool
551
+ (<=): (x: Uint32, y: Uint32) => Bool
517
552
  ```
518
553
 
519
554
  Checks if the first value is less than or equal to the second value.
520
555
 
521
556
  Parameters:
522
557
 
523
- |param|type|description|
524
- |-----|----|-----------|
525
- |`x`|`Uint32`|The first value|
526
- |`y`|`Uint32`|The second value|
558
+ | param | type | description |
559
+ | ----- | -------- | ---------------- |
560
+ | `x` | `Uint32` | The first value |
561
+ | `y` | `Uint32` | The second value |
527
562
 
528
563
  Returns:
529
564
 
530
- |type|description|
531
- |----|-----------|
532
- |`Bool`|`true` if the first value is less than or equal to the second value or `false` otherwise|
565
+ | type | description |
566
+ | ------ | ---------------------------------------------------------------------------------------- |
567
+ | `Bool` | `true` if the first value is less than or equal to the second value or `false` otherwise |
533
568
 
534
569
  ### Uint32.**(>=)**
535
570
 
@@ -539,23 +574,23 @@ No other changes yet.
539
574
  </details>
540
575
 
541
576
  ```grain
542
- (>=) : (x: Uint32, y: Uint32) => Bool
577
+ (>=): (x: Uint32, y: Uint32) => Bool
543
578
  ```
544
579
 
545
580
  Checks if the first value is greater than or equal to the second value.
546
581
 
547
582
  Parameters:
548
583
 
549
- |param|type|description|
550
- |-----|----|-----------|
551
- |`x`|`Uint32`|The first value|
552
- |`y`|`Uint32`|The second value|
584
+ | param | type | description |
585
+ | ----- | -------- | ---------------- |
586
+ | `x` | `Uint32` | The first value |
587
+ | `y` | `Uint32` | The second value |
553
588
 
554
589
  Returns:
555
590
 
556
- |type|description|
557
- |----|-----------|
558
- |`Bool`|`true` if the first value is greater than or equal to the second value or `false` otherwise|
591
+ | type | description |
592
+ | ------ | ------------------------------------------------------------------------------------------- |
593
+ | `Bool` | `true` if the first value is greater than or equal to the second value or `false` otherwise |
559
594
 
560
595
  ### Uint32.**lnot**
561
596
 
@@ -565,22 +600,22 @@ No other changes yet.
565
600
  </details>
566
601
 
567
602
  ```grain
568
- lnot : (value: Uint32) => Uint32
603
+ lnot: (value: Uint32) => Uint32
569
604
  ```
570
605
 
571
606
  Computes the bitwise NOT of the given value.
572
607
 
573
608
  Parameters:
574
609
 
575
- |param|type|description|
576
- |-----|----|-----------|
577
- |`value`|`Uint32`|The given value|
610
+ | param | type | description |
611
+ | ------- | -------- | --------------- |
612
+ | `value` | `Uint32` | The given value |
578
613
 
579
614
  Returns:
580
615
 
581
- |type|description|
582
- |----|-----------|
583
- |`Uint32`|Containing the inverted bits of the given value|
616
+ | type | description |
617
+ | -------- | ----------------------------------------------- |
618
+ | `Uint32` | Containing the inverted bits of the given value |
584
619
 
585
620
  ### Uint32.**(&)**
586
621
 
@@ -590,23 +625,23 @@ No other changes yet.
590
625
  </details>
591
626
 
592
627
  ```grain
593
- (&) : (x: Uint32, y: Uint32) => Uint32
628
+ (&): (x: Uint32, y: Uint32) => Uint32
594
629
  ```
595
630
 
596
631
  Computes the bitwise AND (`&`) on the given operands.
597
632
 
598
633
  Parameters:
599
634
 
600
- |param|type|description|
601
- |-----|----|-----------|
602
- |`x`|`Uint32`|The first operand|
603
- |`y`|`Uint32`|The second operand|
635
+ | param | type | description |
636
+ | ----- | -------- | ------------------ |
637
+ | `x` | `Uint32` | The first operand |
638
+ | `y` | `Uint32` | The second operand |
604
639
 
605
640
  Returns:
606
641
 
607
- |type|description|
608
- |----|-----------|
609
- |`Uint32`|Containing a `1` in each bit position for which the corresponding bits of both operands are `1`|
642
+ | type | description |
643
+ | -------- | ----------------------------------------------------------------------------------------------- |
644
+ | `Uint32` | Containing a `1` in each bit position for which the corresponding bits of both operands are `1` |
610
645
 
611
646
  ### Uint32.**(|)**
612
647
 
@@ -616,23 +651,23 @@ No other changes yet.
616
651
  </details>
617
652
 
618
653
  ```grain
619
- (|) : (x: Uint32, y: Uint32) => Uint32
654
+ (|): (x: Uint32, y: Uint32) => Uint32
620
655
  ```
621
656
 
622
657
  Computes the bitwise OR (`|`) on the given operands.
623
658
 
624
659
  Parameters:
625
660
 
626
- |param|type|description|
627
- |-----|----|-----------|
628
- |`x`|`Uint32`|The first operand|
629
- |`y`|`Uint32`|The second operand|
661
+ | param | type | description |
662
+ | ----- | -------- | ------------------ |
663
+ | `x` | `Uint32` | The first operand |
664
+ | `y` | `Uint32` | The second operand |
630
665
 
631
666
  Returns:
632
667
 
633
- |type|description|
634
- |----|-----------|
635
- |`Uint32`|Containing a `1` in each bit position for which the corresponding bits of either or both operands are `1`|
668
+ | type | description |
669
+ | -------- | --------------------------------------------------------------------------------------------------------- |
670
+ | `Uint32` | Containing a `1` in each bit position for which the corresponding bits of either or both operands are `1` |
636
671
 
637
672
  ### Uint32.**(^)**
638
673
 
@@ -642,23 +677,23 @@ No other changes yet.
642
677
  </details>
643
678
 
644
679
  ```grain
645
- (^) : (x: Uint32, y: Uint32) => Uint32
680
+ (^): (x: Uint32, y: Uint32) => Uint32
646
681
  ```
647
682
 
648
683
  Computes the bitwise XOR (`^`) on the given operands.
649
684
 
650
685
  Parameters:
651
686
 
652
- |param|type|description|
653
- |-----|----|-----------|
654
- |`x`|`Uint32`|The first operand|
655
- |`y`|`Uint32`|The second operand|
687
+ | param | type | description |
688
+ | ----- | -------- | ------------------ |
689
+ | `x` | `Uint32` | The first operand |
690
+ | `y` | `Uint32` | The second operand |
656
691
 
657
692
  Returns:
658
693
 
659
- |type|description|
660
- |----|-----------|
661
- |`Uint32`|Containing a `1` in each bit position for which the corresponding bits of either but not both operands are `1`|
694
+ | type | description |
695
+ | -------- | -------------------------------------------------------------------------------------------------------------- |
696
+ | `Uint32` | Containing a `1` in each bit position for which the corresponding bits of either but not both operands are `1` |
662
697
 
663
698
  ### Uint32.**clz**
664
699
 
@@ -668,22 +703,22 @@ No other changes yet.
668
703
  </details>
669
704
 
670
705
  ```grain
671
- clz : (value: Uint32) => Uint32
706
+ clz: (value: Uint32) => Uint32
672
707
  ```
673
708
 
674
709
  Counts the number of leading zero bits in the value.
675
710
 
676
711
  Parameters:
677
712
 
678
- |param|type|description|
679
- |-----|----|-----------|
680
- |`value`|`Uint32`|The value to inspect|
713
+ | param | type | description |
714
+ | ------- | -------- | -------------------- |
715
+ | `value` | `Uint32` | The value to inspect |
681
716
 
682
717
  Returns:
683
718
 
684
- |type|description|
685
- |----|-----------|
686
- |`Uint32`|The amount of leading zeros|
719
+ | type | description |
720
+ | -------- | --------------------------- |
721
+ | `Uint32` | The amount of leading zeros |
687
722
 
688
723
  ### Uint32.**ctz**
689
724
 
@@ -693,22 +728,22 @@ No other changes yet.
693
728
  </details>
694
729
 
695
730
  ```grain
696
- ctz : (value: Uint32) => Uint32
731
+ ctz: (value: Uint32) => Uint32
697
732
  ```
698
733
 
699
734
  Counts the number of trailing zero bits in the value.
700
735
 
701
736
  Parameters:
702
737
 
703
- |param|type|description|
704
- |-----|----|-----------|
705
- |`value`|`Uint32`|The value to inspect|
738
+ | param | type | description |
739
+ | ------- | -------- | -------------------- |
740
+ | `value` | `Uint32` | The value to inspect |
706
741
 
707
742
  Returns:
708
743
 
709
- |type|description|
710
- |----|-----------|
711
- |`Uint32`|The amount of trailing zeros|
744
+ | type | description |
745
+ | -------- | ---------------------------- |
746
+ | `Uint32` | The amount of trailing zeros |
712
747
 
713
748
  ### Uint32.**popcnt**
714
749
 
@@ -718,20 +753,20 @@ No other changes yet.
718
753
  </details>
719
754
 
720
755
  ```grain
721
- popcnt : (value: Uint32) => Uint32
756
+ popcnt: (value: Uint32) => Uint32
722
757
  ```
723
758
 
724
759
  Counts the number of bits set to `1` in the value, also known as a population count.
725
760
 
726
761
  Parameters:
727
762
 
728
- |param|type|description|
729
- |-----|----|-----------|
730
- |`value`|`Uint32`|The value to inspect|
763
+ | param | type | description |
764
+ | ------- | -------- | -------------------- |
765
+ | `value` | `Uint32` | The value to inspect |
731
766
 
732
767
  Returns:
733
768
 
734
- |type|description|
735
- |----|-----------|
736
- |`Uint32`|The amount of 1-bits in its operand|
769
+ | type | description |
770
+ | -------- | ----------------------------------- |
771
+ | `Uint32` | The amount of 1-bits in its operand |
737
772