@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/int64.md CHANGED
@@ -33,22 +33,22 @@ No other changes yet.
33
33
  </details>
34
34
 
35
35
  ```grain
36
- fromNumber : (number: Number) => Int64
36
+ fromNumber: (number: Number) => Int64
37
37
  ```
38
38
 
39
39
  Converts a Number to an Int64.
40
40
 
41
41
  Parameters:
42
42
 
43
- |param|type|description|
44
- |-----|----|-----------|
45
- |`number`|`Number`|The value to convert|
43
+ | param | type | description |
44
+ | -------- | -------- | -------------------- |
45
+ | `number` | `Number` | The value to convert |
46
46
 
47
47
  Returns:
48
48
 
49
- |type|description|
50
- |----|-----------|
51
- |`Int64`|The Number represented as an Int64|
49
+ | type | description |
50
+ | ------- | ---------------------------------- |
51
+ | `Int64` | The Number represented as an Int64 |
52
52
 
53
53
  ### Int64.**toNumber**
54
54
 
@@ -58,22 +58,22 @@ No other changes yet.
58
58
  </details>
59
59
 
60
60
  ```grain
61
- toNumber : (value: Int64) => Number
61
+ toNumber: (value: Int64) => Number
62
62
  ```
63
63
 
64
64
  Converts an Int64 to a Number.
65
65
 
66
66
  Parameters:
67
67
 
68
- |param|type|description|
69
- |-----|----|-----------|
70
- |`value`|`Int64`|The value to convert|
68
+ | param | type | description |
69
+ | ------- | ------- | -------------------- |
70
+ | `value` | `Int64` | The value to convert |
71
71
 
72
72
  Returns:
73
73
 
74
- |type|description|
75
- |----|-----------|
76
- |`Number`|The Int64 represented as a Number|
74
+ | type | description |
75
+ | -------- | --------------------------------- |
76
+ | `Number` | The Int64 represented as a Number |
77
77
 
78
78
  ### Int64.**fromUint64**
79
79
 
@@ -83,22 +83,22 @@ No other changes yet.
83
83
  </details>
84
84
 
85
85
  ```grain
86
- fromUint64 : (number: Uint64) => Int64
86
+ fromUint64: (number: Uint64) => Int64
87
87
  ```
88
88
 
89
89
  Converts a Uint64 to an Int64.
90
90
 
91
91
  Parameters:
92
92
 
93
- |param|type|description|
94
- |-----|----|-----------|
95
- |`number`|`Uint64`|The value to convert|
93
+ | param | type | description |
94
+ | -------- | -------- | -------------------- |
95
+ | `number` | `Uint64` | The value to convert |
96
96
 
97
97
  Returns:
98
98
 
99
- |type|description|
100
- |----|-----------|
101
- |`Int64`|The Uint64 represented as an Int64|
99
+ | type | description |
100
+ | ------- | ---------------------------------- |
101
+ | `Int64` | The Uint64 represented as an Int64 |
102
102
 
103
103
  Examples:
104
104
 
@@ -106,6 +106,41 @@ Examples:
106
106
  Int64.fromUint64(1uL) == 1L
107
107
  ```
108
108
 
109
+ ### Int64.**reinterpretFloat64**
110
+
111
+ <details disabled>
112
+ <summary tabindex="-1">Added in <code>0.7.0</code></summary>
113
+ No other changes yet.
114
+ </details>
115
+
116
+ ```grain
117
+ reinterpretFloat64: (value: Float64) => Int64
118
+ ```
119
+
120
+ Interprets a Float64 as an Int64.
121
+
122
+ Parameters:
123
+
124
+ | param | type | description |
125
+ | ------- | --------- | -------------------- |
126
+ | `value` | `Float64` | The value to convert |
127
+
128
+ Returns:
129
+
130
+ | type | description |
131
+ | ------- | ----------------------------------- |
132
+ | `Int64` | The Float64 interpreted as an Int64 |
133
+
134
+ Examples:
135
+
136
+ ```grain
137
+ assert Int64.reinterpretFloat64(1.0d) == 4607182418800017408L
138
+ ```
139
+
140
+ ```grain
141
+ assert Int64.reinterpretFloat64(-1.0d) == -4616189618054758400L
142
+ ```
143
+
109
144
  ### Int64.**incr**
110
145
 
111
146
  <details disabled>
@@ -114,22 +149,22 @@ No other changes yet.
114
149
  </details>
115
150
 
116
151
  ```grain
117
- incr : (value: Int64) => Int64
152
+ incr: (value: Int64) => Int64
118
153
  ```
119
154
 
120
155
  Increments the value by one.
121
156
 
122
157
  Parameters:
123
158
 
124
- |param|type|description|
125
- |-----|----|-----------|
126
- |`value`|`Int64`|The value to increment|
159
+ | param | type | description |
160
+ | ------- | ------- | ---------------------- |
161
+ | `value` | `Int64` | The value to increment |
127
162
 
128
163
  Returns:
129
164
 
130
- |type|description|
131
- |----|-----------|
132
- |`Int64`|The incremented value|
165
+ | type | description |
166
+ | ------- | --------------------- |
167
+ | `Int64` | The incremented value |
133
168
 
134
169
  Examples:
135
170
 
@@ -149,22 +184,22 @@ No other changes yet.
149
184
  </details>
150
185
 
151
186
  ```grain
152
- decr : (value: Int64) => Int64
187
+ decr: (value: Int64) => Int64
153
188
  ```
154
189
 
155
190
  Decrements the value by one.
156
191
 
157
192
  Parameters:
158
193
 
159
- |param|type|description|
160
- |-----|----|-----------|
161
- |`value`|`Int64`|The value to decrement|
194
+ | param | type | description |
195
+ | ------- | ------- | ---------------------- |
196
+ | `value` | `Int64` | The value to decrement |
162
197
 
163
198
  Returns:
164
199
 
165
- |type|description|
166
- |----|-----------|
167
- |`Int64`|The decremented value|
200
+ | type | description |
201
+ | ------- | --------------------- |
202
+ | `Int64` | The decremented value |
168
203
 
169
204
  Examples:
170
205
 
@@ -191,23 +226,23 @@ Int64.decr(0L) == -1L
191
226
  </details>
192
227
 
193
228
  ```grain
194
- (+) : (x: Int64, y: Int64) => Int64
229
+ (+): (x: Int64, y: Int64) => Int64
195
230
  ```
196
231
 
197
232
  Computes the sum of its operands.
198
233
 
199
234
  Parameters:
200
235
 
201
- |param|type|description|
202
- |-----|----|-----------|
203
- |`x`|`Int64`|The first operand|
204
- |`y`|`Int64`|The second operand|
236
+ | param | type | description |
237
+ | ----- | ------- | ------------------ |
238
+ | `x` | `Int64` | The first operand |
239
+ | `y` | `Int64` | The second operand |
205
240
 
206
241
  Returns:
207
242
 
208
- |type|description|
209
- |----|-----------|
210
- |`Int64`|The sum of the two operands|
243
+ | type | description |
244
+ | ------- | --------------------------- |
245
+ | `Int64` | The sum of the two operands |
211
246
 
212
247
  Examples:
213
248
 
@@ -231,23 +266,23 @@ assert 1L + 1L == 2L
231
266
  </details>
232
267
 
233
268
  ```grain
234
- (-) : (x: Int64, y: Int64) => Int64
269
+ (-): (x: Int64, y: Int64) => Int64
235
270
  ```
236
271
 
237
272
  Computes the difference of its operands.
238
273
 
239
274
  Parameters:
240
275
 
241
- |param|type|description|
242
- |-----|----|-----------|
243
- |`x`|`Int64`|The first operand|
244
- |`y`|`Int64`|The second operand|
276
+ | param | type | description |
277
+ | ----- | ------- | ------------------ |
278
+ | `x` | `Int64` | The first operand |
279
+ | `y` | `Int64` | The second operand |
245
280
 
246
281
  Returns:
247
282
 
248
- |type|description|
249
- |----|-----------|
250
- |`Int64`|The difference of the two operands|
283
+ | type | description |
284
+ | ------- | ---------------------------------- |
285
+ | `Int64` | The difference of the two operands |
251
286
 
252
287
  Examples:
253
288
 
@@ -271,23 +306,23 @@ assert 2L - 1L == 1L
271
306
  </details>
272
307
 
273
308
  ```grain
274
- (*) : (x: Int64, y: Int64) => Int64
309
+ (*): (x: Int64, y: Int64) => Int64
275
310
  ```
276
311
 
277
312
  Computes the product of its operands.
278
313
 
279
314
  Parameters:
280
315
 
281
- |param|type|description|
282
- |-----|----|-----------|
283
- |`x`|`Int64`|The first operand|
284
- |`y`|`Int64`|The second operand|
316
+ | param | type | description |
317
+ | ----- | ------- | ------------------ |
318
+ | `x` | `Int64` | The first operand |
319
+ | `y` | `Int64` | The second operand |
285
320
 
286
321
  Returns:
287
322
 
288
- |type|description|
289
- |----|-----------|
290
- |`Int64`|The product of the two operands|
323
+ | type | description |
324
+ | ------- | ------------------------------- |
325
+ | `Int64` | The product of the two operands |
291
326
 
292
327
  Examples:
293
328
 
@@ -311,23 +346,23 @@ assert 2L * 2L == 4L
311
346
  </details>
312
347
 
313
348
  ```grain
314
- (/) : (x: Int64, y: Int64) => Int64
349
+ (/): (x: Int64, y: Int64) => Int64
315
350
  ```
316
351
 
317
352
  Computes the quotient of its operands using signed division.
318
353
 
319
354
  Parameters:
320
355
 
321
- |param|type|description|
322
- |-----|----|-----------|
323
- |`x`|`Int64`|The first operand|
324
- |`y`|`Int64`|The second operand|
356
+ | param | type | description |
357
+ | ----- | ------- | ------------------ |
358
+ | `x` | `Int64` | The first operand |
359
+ | `y` | `Int64` | The second operand |
325
360
 
326
361
  Returns:
327
362
 
328
- |type|description|
329
- |----|-----------|
330
- |`Int64`|The quotient of its operands|
363
+ | type | description |
364
+ | ------- | ---------------------------- |
365
+ | `Int64` | The quotient of its operands |
331
366
 
332
367
  Examples:
333
368
 
@@ -344,23 +379,23 @@ No other changes yet.
344
379
  </details>
345
380
 
346
381
  ```grain
347
- rem : (x: Int64, y: Int64) => Int64
382
+ rem: (x: Int64, y: Int64) => Int64
348
383
  ```
349
384
 
350
385
  Computes the remainder of the division of its operands using signed division.
351
386
 
352
387
  Parameters:
353
388
 
354
- |param|type|description|
355
- |-----|----|-----------|
356
- |`x`|`Int64`|The first operand|
357
- |`y`|`Int64`|The second operand|
389
+ | param | type | description |
390
+ | ----- | ------- | ------------------ |
391
+ | `x` | `Int64` | The first operand |
392
+ | `y` | `Int64` | The second operand |
358
393
 
359
394
  Returns:
360
395
 
361
- |type|description|
362
- |----|-----------|
363
- |`Int64`|The remainder of its operands|
396
+ | type | description |
397
+ | ------- | ----------------------------- |
398
+ | `Int64` | The remainder of its operands |
364
399
 
365
400
  Examples:
366
401
 
@@ -383,7 +418,7 @@ Int64.rem(8L, 3L) == 2L
383
418
  </details>
384
419
 
385
420
  ```grain
386
- (%) : (x: Int64, y: Int64) => Int64
421
+ (%): (x: Int64, y: Int64) => Int64
387
422
  ```
388
423
 
389
424
  Computes the remainder of the division of the first operand by the second.
@@ -391,16 +426,16 @@ The result will have the sign of the second operand.
391
426
 
392
427
  Parameters:
393
428
 
394
- |param|type|description|
395
- |-----|----|-----------|
396
- |`x`|`Int64`|The first operand|
397
- |`y`|`Int64`|The second operand|
429
+ | param | type | description |
430
+ | ----- | ------- | ------------------ |
431
+ | `x` | `Int64` | The first operand |
432
+ | `y` | `Int64` | The second operand |
398
433
 
399
434
  Returns:
400
435
 
401
- |type|description|
402
- |----|-----------|
403
- |`Int64`|The modulus of its operands|
436
+ | type | description |
437
+ | ------- | --------------------------- |
438
+ | `Int64` | The modulus of its operands |
404
439
 
405
440
  Throws:
406
441
 
@@ -423,23 +458,23 @@ No other changes yet.
423
458
  </details>
424
459
 
425
460
  ```grain
426
- rotl : (value: Int64, amount: Int64) => Int64
461
+ rotl: (value: Int64, amount: Int64) => Int64
427
462
  ```
428
463
 
429
464
  Rotates the bits of the value left by the given number of bits.
430
465
 
431
466
  Parameters:
432
467
 
433
- |param|type|description|
434
- |-----|----|-----------|
435
- |`value`|`Int64`|The value to rotate|
436
- |`amount`|`Int64`|The number of bits to rotate by|
468
+ | param | type | description |
469
+ | -------- | ------- | ------------------------------- |
470
+ | `value` | `Int64` | The value to rotate |
471
+ | `amount` | `Int64` | The number of bits to rotate by |
437
472
 
438
473
  Returns:
439
474
 
440
- |type|description|
441
- |----|-----------|
442
- |`Int64`|The rotated value|
475
+ | type | description |
476
+ | ------- | ----------------- |
477
+ | `Int64` | The rotated value |
443
478
 
444
479
  Examples:
445
480
 
@@ -459,23 +494,23 @@ No other changes yet.
459
494
  </details>
460
495
 
461
496
  ```grain
462
- rotr : (value: Int64, amount: Int64) => Int64
497
+ rotr: (value: Int64, amount: Int64) => Int64
463
498
  ```
464
499
 
465
500
  Rotates the bits of the value right by the given number of bits.
466
501
 
467
502
  Parameters:
468
503
 
469
- |param|type|description|
470
- |-----|----|-----------|
471
- |`value`|`Int64`|The value to rotate|
472
- |`amount`|`Int64`|The number of bits to rotate by|
504
+ | param | type | description |
505
+ | -------- | ------- | ------------------------------- |
506
+ | `value` | `Int64` | The value to rotate |
507
+ | `amount` | `Int64` | The number of bits to rotate by |
473
508
 
474
509
  Returns:
475
510
 
476
- |type|description|
477
- |----|-----------|
478
- |`Int64`|The rotated value|
511
+ | type | description |
512
+ | ------- | ----------------- |
513
+ | `Int64` | The rotated value |
479
514
 
480
515
  Examples:
481
516
 
@@ -502,23 +537,23 @@ Int64.rotr(4L, 2L) == 1L
502
537
  </details>
503
538
 
504
539
  ```grain
505
- (<<) : (value: Int64, amount: Int64) => Int64
540
+ (<<): (value: Int64, amount: Int64) => Int64
506
541
  ```
507
542
 
508
543
  Shifts the bits of the value left by the given number of bits.
509
544
 
510
545
  Parameters:
511
546
 
512
- |param|type|description|
513
- |-----|----|-----------|
514
- |`value`|`Int64`|The value to shift|
515
- |`amount`|`Int64`|The number of bits to shift by|
547
+ | param | type | description |
548
+ | -------- | ------- | ------------------------------ |
549
+ | `value` | `Int64` | The value to shift |
550
+ | `amount` | `Int64` | The number of bits to shift by |
516
551
 
517
552
  Returns:
518
553
 
519
- |type|description|
520
- |----|-----------|
521
- |`Int64`|The shifted value|
554
+ | type | description |
555
+ | ------- | ----------------- |
556
+ | `Int64` | The shifted value |
522
557
 
523
558
  Examples:
524
559
 
@@ -542,23 +577,23 @@ assert (5L << 1L) == 10L
542
577
  </details>
543
578
 
544
579
  ```grain
545
- (>>) : (value: Int64, amount: Int64) => Int64
580
+ (>>): (value: Int64, amount: Int64) => Int64
546
581
  ```
547
582
 
548
583
  Shifts the bits of the value right by the given number of bits, preserving the sign bit.
549
584
 
550
585
  Parameters:
551
586
 
552
- |param|type|description|
553
- |-----|----|-----------|
554
- |`value`|`Int64`|The value to shift|
555
- |`amount`|`Int64`|The amount to shift by|
587
+ | param | type | description |
588
+ | -------- | ------- | ---------------------- |
589
+ | `value` | `Int64` | The value to shift |
590
+ | `amount` | `Int64` | The amount to shift by |
556
591
 
557
592
  Returns:
558
593
 
559
- |type|description|
560
- |----|-----------|
561
- |`Int64`|The shifted value|
594
+ | type | description |
595
+ | ------- | ----------------- |
596
+ | `Int64` | The shifted value |
562
597
 
563
598
  Examples:
564
599
 
@@ -582,23 +617,23 @@ assert (5L >> 1L) == 2L
582
617
  </details>
583
618
 
584
619
  ```grain
585
- (==) : (x: Int64, y: Int64) => Bool
620
+ (==): (x: Int64, y: Int64) => Bool
586
621
  ```
587
622
 
588
623
  Checks if the first value is equal to the second value.
589
624
 
590
625
  Parameters:
591
626
 
592
- |param|type|description|
593
- |-----|----|-----------|
594
- |`x`|`Int64`|The first value|
595
- |`y`|`Int64`|The second value|
627
+ | param | type | description |
628
+ | ----- | ------- | ---------------- |
629
+ | `x` | `Int64` | The first value |
630
+ | `y` | `Int64` | The second value |
596
631
 
597
632
  Returns:
598
633
 
599
- |type|description|
600
- |----|-----------|
601
- |`Bool`|`true` if the first value is equal to the second value or `false` otherwise|
634
+ | type | description |
635
+ | ------ | --------------------------------------------------------------------------- |
636
+ | `Bool` | `true` if the first value is equal to the second value or `false` otherwise |
602
637
 
603
638
  Examples:
604
639
 
@@ -622,23 +657,23 @@ assert 1L == 1L
622
657
  </details>
623
658
 
624
659
  ```grain
625
- (!=) : (x: Int64, y: Int64) => Bool
660
+ (!=): (x: Int64, y: Int64) => Bool
626
661
  ```
627
662
 
628
663
  Checks if the first value is not equal to the second value.
629
664
 
630
665
  Parameters:
631
666
 
632
- |param|type|description|
633
- |-----|----|-----------|
634
- |`x`|`Int64`|The first value|
635
- |`y`|`Int64`|The second value|
667
+ | param | type | description |
668
+ | ----- | ------- | ---------------- |
669
+ | `x` | `Int64` | The first value |
670
+ | `y` | `Int64` | The second value |
636
671
 
637
672
  Returns:
638
673
 
639
- |type|description|
640
- |----|-----------|
641
- |`Bool`|`true` if the first value is not equal to the second value or `false` otherwise|
674
+ | type | description |
675
+ | ------ | ------------------------------------------------------------------------------- |
676
+ | `Bool` | `true` if the first value is not equal to the second value or `false` otherwise |
642
677
 
643
678
  Examples:
644
679
 
@@ -655,22 +690,22 @@ No other changes yet.
655
690
  </details>
656
691
 
657
692
  ```grain
658
- eqz : (value: Int64) => Bool
693
+ eqz: (value: Int64) => Bool
659
694
  ```
660
695
 
661
696
  Checks if the given value is equal to zero.
662
697
 
663
698
  Parameters:
664
699
 
665
- |param|type|description|
666
- |-----|----|-----------|
667
- |`value`|`Int64`|The value to inspect|
700
+ | param | type | description |
701
+ | ------- | ------- | -------------------- |
702
+ | `value` | `Int64` | The value to inspect |
668
703
 
669
704
  Returns:
670
705
 
671
- |type|description|
672
- |----|-----------|
673
- |`Bool`|`true` if the first value is equal to zero or `false` otherwise|
706
+ | type | description |
707
+ | ------ | --------------------------------------------------------------- |
708
+ | `Bool` | `true` if the first value is equal to zero or `false` otherwise |
674
709
 
675
710
  Examples:
676
711
 
@@ -697,23 +732,23 @@ Int64.eqz(1L) == false
697
732
  </details>
698
733
 
699
734
  ```grain
700
- (<) : (x: Int64, y: Int64) => Bool
735
+ (<): (x: Int64, y: Int64) => Bool
701
736
  ```
702
737
 
703
738
  Checks if the first value is less than the second value.
704
739
 
705
740
  Parameters:
706
741
 
707
- |param|type|description|
708
- |-----|----|-----------|
709
- |`x`|`Int64`|The first value|
710
- |`y`|`Int64`|The second value|
742
+ | param | type | description |
743
+ | ----- | ------- | ---------------- |
744
+ | `x` | `Int64` | The first value |
745
+ | `y` | `Int64` | The second value |
711
746
 
712
747
  Returns:
713
748
 
714
- |type|description|
715
- |----|-----------|
716
- |`Bool`|`true` if the first value is less than the second value or `false` otherwise|
749
+ | type | description |
750
+ | ------ | ---------------------------------------------------------------------------- |
751
+ | `Bool` | `true` if the first value is less than the second value or `false` otherwise |
717
752
 
718
753
  Examples:
719
754
 
@@ -737,23 +772,23 @@ assert 1L < 2L
737
772
  </details>
738
773
 
739
774
  ```grain
740
- (>) : (x: Int64, y: Int64) => Bool
775
+ (>): (x: Int64, y: Int64) => Bool
741
776
  ```
742
777
 
743
778
  Checks if the first value is greater than the second value.
744
779
 
745
780
  Parameters:
746
781
 
747
- |param|type|description|
748
- |-----|----|-----------|
749
- |`x`|`Int64`|The first value|
750
- |`y`|`Int64`|The second value|
782
+ | param | type | description |
783
+ | ----- | ------- | ---------------- |
784
+ | `x` | `Int64` | The first value |
785
+ | `y` | `Int64` | The second value |
751
786
 
752
787
  Returns:
753
788
 
754
- |type|description|
755
- |----|-----------|
756
- |`Bool`|`true` if the first value is greater than the second value or `false` otherwise|
789
+ | type | description |
790
+ | ------ | ------------------------------------------------------------------------------- |
791
+ | `Bool` | `true` if the first value is greater than the second value or `false` otherwise |
757
792
 
758
793
  Examples:
759
794
 
@@ -777,23 +812,23 @@ assert 2L > 1L
777
812
  </details>
778
813
 
779
814
  ```grain
780
- (<=) : (x: Int64, y: Int64) => Bool
815
+ (<=): (x: Int64, y: Int64) => Bool
781
816
  ```
782
817
 
783
818
  Checks if the first value is less than or equal to the second value.
784
819
 
785
820
  Parameters:
786
821
 
787
- |param|type|description|
788
- |-----|----|-----------|
789
- |`x`|`Int64`|The first value|
790
- |`y`|`Int64`|The second value|
822
+ | param | type | description |
823
+ | ----- | ------- | ---------------- |
824
+ | `x` | `Int64` | The first value |
825
+ | `y` | `Int64` | The second value |
791
826
 
792
827
  Returns:
793
828
 
794
- |type|description|
795
- |----|-----------|
796
- |`Bool`|`true` if the first value is less than or equal to the second value or `false` otherwise|
829
+ | type | description |
830
+ | ------ | ---------------------------------------------------------------------------------------- |
831
+ | `Bool` | `true` if the first value is less than or equal to the second value or `false` otherwise |
797
832
 
798
833
  Examples:
799
834
 
@@ -822,23 +857,23 @@ assert 1L <= 1L
822
857
  </details>
823
858
 
824
859
  ```grain
825
- (>=) : (x: Int64, y: Int64) => Bool
860
+ (>=): (x: Int64, y: Int64) => Bool
826
861
  ```
827
862
 
828
863
  Checks if the first value is greater than or equal to the second value.
829
864
 
830
865
  Parameters:
831
866
 
832
- |param|type|description|
833
- |-----|----|-----------|
834
- |`x`|`Int64`|The first value|
835
- |`y`|`Int64`|The second value|
867
+ | param | type | description |
868
+ | ----- | ------- | ---------------- |
869
+ | `x` | `Int64` | The first value |
870
+ | `y` | `Int64` | The second value |
836
871
 
837
872
  Returns:
838
873
 
839
- |type|description|
840
- |----|-----------|
841
- |`Bool`|`true` if the first value is greater than or equal to the second value or `false` otherwise|
874
+ | type | description |
875
+ | ------ | ------------------------------------------------------------------------------------------- |
876
+ | `Bool` | `true` if the first value is greater than or equal to the second value or `false` otherwise |
842
877
 
843
878
  Examples:
844
879
 
@@ -860,22 +895,22 @@ No other changes yet.
860
895
  </details>
861
896
 
862
897
  ```grain
863
- lnot : (value: Int64) => Int64
898
+ lnot: (value: Int64) => Int64
864
899
  ```
865
900
 
866
901
  Computes the bitwise NOT of the given value.
867
902
 
868
903
  Parameters:
869
904
 
870
- |param|type|description|
871
- |-----|----|-----------|
872
- |`value`|`Int64`|The given value|
905
+ | param | type | description |
906
+ | ------- | ------- | --------------- |
907
+ | `value` | `Int64` | The given value |
873
908
 
874
909
  Returns:
875
910
 
876
- |type|description|
877
- |----|-----------|
878
- |`Int64`|Containing the inverted bits of the given value|
911
+ | type | description |
912
+ | ------- | ----------------------------------------------- |
913
+ | `Int64` | Containing the inverted bits of the given value |
879
914
 
880
915
  Examples:
881
916
 
@@ -898,23 +933,23 @@ Int64.lnot(-5L) == 4L
898
933
  </details>
899
934
 
900
935
  ```grain
901
- (&) : (x: Int64, y: Int64) => Int64
936
+ (&): (x: Int64, y: Int64) => Int64
902
937
  ```
903
938
 
904
939
  Computes the bitwise AND (`&`) on the given operands.
905
940
 
906
941
  Parameters:
907
942
 
908
- |param|type|description|
909
- |-----|----|-----------|
910
- |`x`|`Int64`|The first operand|
911
- |`y`|`Int64`|The second operand|
943
+ | param | type | description |
944
+ | ----- | ------- | ------------------ |
945
+ | `x` | `Int64` | The first operand |
946
+ | `y` | `Int64` | The second operand |
912
947
 
913
948
  Returns:
914
949
 
915
- |type|description|
916
- |----|-----------|
917
- |`Int64`|Containing a `1` in each bit position for which the corresponding bits of both operands are `1`|
950
+ | type | description |
951
+ | ------- | ----------------------------------------------------------------------------------------------- |
952
+ | `Int64` | Containing a `1` in each bit position for which the corresponding bits of both operands are `1` |
918
953
 
919
954
  Examples:
920
955
 
@@ -938,23 +973,23 @@ assert (3L & 4L) == 0L
938
973
  </details>
939
974
 
940
975
  ```grain
941
- (|) : (x: Int64, y: Int64) => Int64
976
+ (|): (x: Int64, y: Int64) => Int64
942
977
  ```
943
978
 
944
979
  Computes the bitwise OR (`|`) on the given operands.
945
980
 
946
981
  Parameters:
947
982
 
948
- |param|type|description|
949
- |-----|----|-----------|
950
- |`x`|`Int64`|The first operand|
951
- |`y`|`Int64`|The second operand|
983
+ | param | type | description |
984
+ | ----- | ------- | ------------------ |
985
+ | `x` | `Int64` | The first operand |
986
+ | `y` | `Int64` | The second operand |
952
987
 
953
988
  Returns:
954
989
 
955
- |type|description|
956
- |----|-----------|
957
- |`Int64`|Containing a `1` in each bit position for which the corresponding bits of either or both operands are `1`|
990
+ | type | description |
991
+ | ------- | --------------------------------------------------------------------------------------------------------- |
992
+ | `Int64` | Containing a `1` in each bit position for which the corresponding bits of either or both operands are `1` |
958
993
 
959
994
  Examples:
960
995
 
@@ -978,23 +1013,23 @@ assert (3L | 4L) == 7L
978
1013
  </details>
979
1014
 
980
1015
  ```grain
981
- (^) : (x: Int64, y: Int64) => Int64
1016
+ (^): (x: Int64, y: Int64) => Int64
982
1017
  ```
983
1018
 
984
1019
  Computes the bitwise XOR (`^`) on the given operands.
985
1020
 
986
1021
  Parameters:
987
1022
 
988
- |param|type|description|
989
- |-----|----|-----------|
990
- |`x`|`Int64`|The first operand|
991
- |`y`|`Int64`|The second operand|
1023
+ | param | type | description |
1024
+ | ----- | ------- | ------------------ |
1025
+ | `x` | `Int64` | The first operand |
1026
+ | `y` | `Int64` | The second operand |
992
1027
 
993
1028
  Returns:
994
1029
 
995
- |type|description|
996
- |----|-----------|
997
- |`Int64`|Containing a `1` in each bit position for which the corresponding bits of either but not both operands are `1`|
1030
+ | type | description |
1031
+ | ------- | -------------------------------------------------------------------------------------------------------------- |
1032
+ | `Int64` | Containing a `1` in each bit position for which the corresponding bits of either but not both operands are `1` |
998
1033
 
999
1034
  Examples:
1000
1035
 
@@ -1011,22 +1046,22 @@ No other changes yet.
1011
1046
  </details>
1012
1047
 
1013
1048
  ```grain
1014
- clz : (value: Int64) => Int64
1049
+ clz: (value: Int64) => Int64
1015
1050
  ```
1016
1051
 
1017
1052
  Counts the number of leading zero bits in the value.
1018
1053
 
1019
1054
  Parameters:
1020
1055
 
1021
- |param|type|description|
1022
- |-----|----|-----------|
1023
- |`value`|`Int64`|The value to inspect|
1056
+ | param | type | description |
1057
+ | ------- | ------- | -------------------- |
1058
+ | `value` | `Int64` | The value to inspect |
1024
1059
 
1025
1060
  Returns:
1026
1061
 
1027
- |type|description|
1028
- |----|-----------|
1029
- |`Int64`|The amount of leading zeros|
1062
+ | type | description |
1063
+ | ------- | --------------------------- |
1064
+ | `Int64` | The amount of leading zeros |
1030
1065
 
1031
1066
  Examples:
1032
1067
 
@@ -1046,22 +1081,22 @@ No other changes yet.
1046
1081
  </details>
1047
1082
 
1048
1083
  ```grain
1049
- ctz : (value: Int64) => Int64
1084
+ ctz: (value: Int64) => Int64
1050
1085
  ```
1051
1086
 
1052
1087
  Counts the number of trailing zero bits in the value.
1053
1088
 
1054
1089
  Parameters:
1055
1090
 
1056
- |param|type|description|
1057
- |-----|----|-----------|
1058
- |`value`|`Int64`|The value to inspect|
1091
+ | param | type | description |
1092
+ | ------- | ------- | -------------------- |
1093
+ | `value` | `Int64` | The value to inspect |
1059
1094
 
1060
1095
  Returns:
1061
1096
 
1062
- |type|description|
1063
- |----|-----------|
1064
- |`Int64`|The amount of trailing zeros|
1097
+ | type | description |
1098
+ | ------- | ---------------------------- |
1099
+ | `Int64` | The amount of trailing zeros |
1065
1100
 
1066
1101
  Examples:
1067
1102
 
@@ -1081,22 +1116,22 @@ No other changes yet.
1081
1116
  </details>
1082
1117
 
1083
1118
  ```grain
1084
- popcnt : (value: Int64) => Int64
1119
+ popcnt: (value: Int64) => Int64
1085
1120
  ```
1086
1121
 
1087
1122
  Counts the number of bits set to `1` in the value, also known as a population count.
1088
1123
 
1089
1124
  Parameters:
1090
1125
 
1091
- |param|type|description|
1092
- |-----|----|-----------|
1093
- |`value`|`Int64`|The value to inspect|
1126
+ | param | type | description |
1127
+ | ------- | ------- | -------------------- |
1128
+ | `value` | `Int64` | The value to inspect |
1094
1129
 
1095
1130
  Returns:
1096
1131
 
1097
- |type|description|
1098
- |----|-----------|
1099
- |`Int64`|The amount of 1-bits in its operand|
1132
+ | type | description |
1133
+ | ------- | ----------------------------------- |
1134
+ | `Int64` | The amount of 1-bits in its operand |
1100
1135
 
1101
1136
  Examples:
1102
1137
 
@@ -1116,28 +1151,28 @@ No other changes yet.
1116
1151
  </details>
1117
1152
 
1118
1153
  ```grain
1119
- (**) : (base: Int64, power: Int64) => Int64
1154
+ (**): (base: Int64, power: Int64) => Int64
1120
1155
  ```
1121
1156
 
1122
1157
  Computes the exponentiation of the given base and power.
1123
1158
 
1124
1159
  Parameters:
1125
1160
 
1126
- |param|type|description|
1127
- |-----|----|-----------|
1128
- |`base`|`Int64`|The base number|
1129
- |`power`|`Int64`|The exponent number|
1161
+ | param | type | description |
1162
+ | ------- | ------- | ------------------- |
1163
+ | `base` | `Int64` | The base number |
1164
+ | `power` | `Int64` | The exponent number |
1130
1165
 
1131
1166
  Returns:
1132
1167
 
1133
- |type|description|
1134
- |----|-----------|
1135
- |`Int64`|The base raised to the given power|
1168
+ | type | description |
1169
+ | ------- | ---------------------------------- |
1170
+ | `Int64` | The base raised to the given power |
1136
1171
 
1137
1172
  Examples:
1138
1173
 
1139
1174
  ```grain
1140
- from Int64 use { (**) }
1175
+ use Int64.{ (**) }
1141
1176
  assert 2L ** 3L == 8L
1142
1177
  ```
1143
1178