@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/bigint.md CHANGED
@@ -37,22 +37,22 @@ No other changes yet.
37
37
  </details>
38
38
 
39
39
  ```grain
40
- fromNumber : (number: Number) => BigInt
40
+ fromNumber: (number: Number) => BigInt
41
41
  ```
42
42
 
43
43
  Converts a Number to a BigInt.
44
44
 
45
45
  Parameters:
46
46
 
47
- |param|type|description|
48
- |-----|----|-----------|
49
- |`number`|`Number`|The value to convert|
47
+ | param | type | description |
48
+ | -------- | -------- | -------------------- |
49
+ | `number` | `Number` | The value to convert |
50
50
 
51
51
  Returns:
52
52
 
53
- |type|description|
54
- |----|-----------|
55
- |`BigInt`|The Number represented as a BigInt|
53
+ | type | description |
54
+ | -------- | ---------------------------------- |
55
+ | `BigInt` | The Number represented as a BigInt |
56
56
 
57
57
  ### BigInt.**toNumber**
58
58
 
@@ -62,22 +62,22 @@ No other changes yet.
62
62
  </details>
63
63
 
64
64
  ```grain
65
- toNumber : (num: BigInt) => Number
65
+ toNumber: (num: BigInt) => Number
66
66
  ```
67
67
 
68
68
  Converts a BigInt to a Number.
69
69
 
70
70
  Parameters:
71
71
 
72
- |param|type|description|
73
- |-----|----|-----------|
74
- |`num`|`BigInt`|The value to convert|
72
+ | param | type | description |
73
+ | ----- | -------- | -------------------- |
74
+ | `num` | `BigInt` | The value to convert |
75
75
 
76
76
  Returns:
77
77
 
78
- |type|description|
79
- |----|-----------|
80
- |`Number`|The BigInt represented as a Number|
78
+ | type | description |
79
+ | -------- | ---------------------------------- |
80
+ | `Number` | The BigInt represented as a Number |
81
81
 
82
82
  ### BigInt.**incr**
83
83
 
@@ -87,22 +87,22 @@ No other changes yet.
87
87
  </details>
88
88
 
89
89
  ```grain
90
- incr : (num: BigInt) => BigInt
90
+ incr: (num: BigInt) => BigInt
91
91
  ```
92
92
 
93
93
  Increments the value by one.
94
94
 
95
95
  Parameters:
96
96
 
97
- |param|type|description|
98
- |-----|----|-----------|
99
- |`num`|`BigInt`|The value to increment|
97
+ | param | type | description |
98
+ | ----- | -------- | ---------------------- |
99
+ | `num` | `BigInt` | The value to increment |
100
100
 
101
101
  Returns:
102
102
 
103
- |type|description|
104
- |----|-----------|
105
- |`BigInt`|The incremented value|
103
+ | type | description |
104
+ | -------- | --------------------- |
105
+ | `BigInt` | The incremented value |
106
106
 
107
107
  Examples:
108
108
 
@@ -122,22 +122,22 @@ No other changes yet.
122
122
  </details>
123
123
 
124
124
  ```grain
125
- decr : (num: BigInt) => BigInt
125
+ decr: (num: BigInt) => BigInt
126
126
  ```
127
127
 
128
128
  Decrements the value by one.
129
129
 
130
130
  Parameters:
131
131
 
132
- |param|type|description|
133
- |-----|----|-----------|
134
- |`num`|`BigInt`|The value to decrement|
132
+ | param | type | description |
133
+ | ----- | -------- | ---------------------- |
134
+ | `num` | `BigInt` | The value to decrement |
135
135
 
136
136
  Returns:
137
137
 
138
- |type|description|
139
- |----|-----------|
140
- |`BigInt`|The decremented value|
138
+ | type | description |
139
+ | -------- | --------------------- |
140
+ | `BigInt` | The decremented value |
141
141
 
142
142
  Examples:
143
143
 
@@ -157,22 +157,22 @@ No other changes yet.
157
157
  </details>
158
158
 
159
159
  ```grain
160
- neg : (num: BigInt) => BigInt
160
+ neg: (num: BigInt) => BigInt
161
161
  ```
162
162
 
163
163
  Negates the given operand.
164
164
 
165
165
  Parameters:
166
166
 
167
- |param|type|description|
168
- |-----|----|-----------|
169
- |`num`|`BigInt`|The operand|
167
+ | param | type | description |
168
+ | ----- | -------- | ----------- |
169
+ | `num` | `BigInt` | The operand |
170
170
 
171
171
  Returns:
172
172
 
173
- |type|description|
174
- |----|-----------|
175
- |`BigInt`|The negated operand|
173
+ | type | description |
174
+ | -------- | ------------------- |
175
+ | `BigInt` | The negated operand |
176
176
 
177
177
  Examples:
178
178
 
@@ -192,22 +192,22 @@ No other changes yet.
192
192
  </details>
193
193
 
194
194
  ```grain
195
- abs : (num: BigInt) => BigInt
195
+ abs: (num: BigInt) => BigInt
196
196
  ```
197
197
 
198
198
  Returns the absolute value of the given operand.
199
199
 
200
200
  Parameters:
201
201
 
202
- |param|type|description|
203
- |-----|----|-----------|
204
- |`num`|`BigInt`|The operand|
202
+ | param | type | description |
203
+ | ----- | -------- | ----------- |
204
+ | `num` | `BigInt` | The operand |
205
205
 
206
206
  Returns:
207
207
 
208
- |type|description|
209
- |----|-----------|
210
- |`BigInt`|The operand's absolute value|
208
+ | type | description |
209
+ | -------- | ---------------------------- |
210
+ | `BigInt` | The operand's absolute value |
211
211
 
212
212
  Examples:
213
213
 
@@ -234,23 +234,23 @@ BigInt.abs(-1t) == 1t
234
234
  </details>
235
235
 
236
236
  ```grain
237
- (+) : (num1: BigInt, num2: BigInt) => BigInt
237
+ (+): (num1: BigInt, num2: BigInt) => BigInt
238
238
  ```
239
239
 
240
240
  Computes the sum of its operands.
241
241
 
242
242
  Parameters:
243
243
 
244
- |param|type|description|
245
- |-----|----|-----------|
246
- |`num1`|`BigInt`|The first operand|
247
- |`num2`|`BigInt`|The second operand|
244
+ | param | type | description |
245
+ | ------ | -------- | ------------------ |
246
+ | `num1` | `BigInt` | The first operand |
247
+ | `num2` | `BigInt` | The second operand |
248
248
 
249
249
  Returns:
250
250
 
251
- |type|description|
252
- |----|-----------|
253
- |`BigInt`|The sum of the two operands|
251
+ | type | description |
252
+ | -------- | --------------------------- |
253
+ | `BigInt` | The sum of the two operands |
254
254
 
255
255
  Examples:
256
256
 
@@ -274,23 +274,23 @@ assert 1t + 1t == 2t
274
274
  </details>
275
275
 
276
276
  ```grain
277
- (-) : (num1: BigInt, num2: BigInt) => BigInt
277
+ (-): (num1: BigInt, num2: BigInt) => BigInt
278
278
  ```
279
279
 
280
280
  Computes the difference of its operands.
281
281
 
282
282
  Parameters:
283
283
 
284
- |param|type|description|
285
- |-----|----|-----------|
286
- |`num1`|`BigInt`|The first operand|
287
- |`num2`|`BigInt`|The second operand|
284
+ | param | type | description |
285
+ | ------ | -------- | ------------------ |
286
+ | `num1` | `BigInt` | The first operand |
287
+ | `num2` | `BigInt` | The second operand |
288
288
 
289
289
  Returns:
290
290
 
291
- |type|description|
292
- |----|-----------|
293
- |`BigInt`|The difference of the two operands|
291
+ | type | description |
292
+ | -------- | ---------------------------------- |
293
+ | `BigInt` | The difference of the two operands |
294
294
 
295
295
  Examples:
296
296
 
@@ -314,23 +314,23 @@ assert 3t - 1t == 2t
314
314
  </details>
315
315
 
316
316
  ```grain
317
- (*) : (num1: BigInt, num2: BigInt) => BigInt
317
+ (*): (num1: BigInt, num2: BigInt) => BigInt
318
318
  ```
319
319
 
320
320
  Computes the product of its operands.
321
321
 
322
322
  Parameters:
323
323
 
324
- |param|type|description|
325
- |-----|----|-----------|
326
- |`num1`|`BigInt`|The first operand|
327
- |`num2`|`BigInt`|The second operand|
324
+ | param | type | description |
325
+ | ------ | -------- | ------------------ |
326
+ | `num1` | `BigInt` | The first operand |
327
+ | `num2` | `BigInt` | The second operand |
328
328
 
329
329
  Returns:
330
330
 
331
- |type|description|
332
- |----|-----------|
333
- |`BigInt`|The product of the two operands|
331
+ | type | description |
332
+ | -------- | ------------------------------- |
333
+ | `BigInt` | The product of the two operands |
334
334
 
335
335
  Examples:
336
336
 
@@ -354,7 +354,7 @@ assert 3t * 3t == 9t
354
354
  </details>
355
355
 
356
356
  ```grain
357
- (/) : (num1: BigInt, num2: BigInt) => BigInt
357
+ (/): (num1: BigInt, num2: BigInt) => BigInt
358
358
  ```
359
359
 
360
360
  Computes the quotient of its operands using signed (truncated) division
@@ -362,16 +362,16 @@ Computes the quotient of its operands using signed (truncated) division
362
362
 
363
363
  Parameters:
364
364
 
365
- |param|type|description|
366
- |-----|----|-----------|
367
- |`num1`|`BigInt`|The first operand|
368
- |`num2`|`BigInt`|The second operand|
365
+ | param | type | description |
366
+ | ------ | -------- | ------------------ |
367
+ | `num1` | `BigInt` | The first operand |
368
+ | `num2` | `BigInt` | The second operand |
369
369
 
370
370
  Returns:
371
371
 
372
- |type|description|
373
- |----|-----------|
374
- |`BigInt`|The quotient of its operands|
372
+ | type | description |
373
+ | -------- | ---------------------------- |
374
+ | `BigInt` | The quotient of its operands |
375
375
 
376
376
  Examples:
377
377
 
@@ -388,7 +388,7 @@ No other changes yet.
388
388
  </details>
389
389
 
390
390
  ```grain
391
- rem : (num1: BigInt, num2: BigInt) => BigInt
391
+ rem: (num1: BigInt, num2: BigInt) => BigInt
392
392
  ```
393
393
 
394
394
  Computes the remainder of the division of its operands using signed (truncated) division
@@ -396,16 +396,16 @@ Computes the remainder of the division of its operands using signed (truncated)
396
396
 
397
397
  Parameters:
398
398
 
399
- |param|type|description|
400
- |-----|----|-----------|
401
- |`num1`|`BigInt`|The first operand|
402
- |`num2`|`BigInt`|The second operand|
399
+ | param | type | description |
400
+ | ------ | -------- | ------------------ |
401
+ | `num1` | `BigInt` | The first operand |
402
+ | `num2` | `BigInt` | The second operand |
403
403
 
404
404
  Returns:
405
405
 
406
- |type|description|
407
- |----|-----------|
408
- |`BigInt`|The remainder of its operands|
406
+ | type | description |
407
+ | -------- | ----------------------------- |
408
+ | `BigInt` | The remainder of its operands |
409
409
 
410
410
  Examples:
411
411
 
@@ -421,23 +421,23 @@ No other changes yet.
421
421
  </details>
422
422
 
423
423
  ```grain
424
- quotRem : (num1: BigInt, num2: BigInt) => (BigInt, BigInt)
424
+ quotRem: (num1: BigInt, num2: BigInt) => (BigInt, BigInt)
425
425
  ```
426
426
 
427
427
  Computes the quotient and remainder of its operands using signed (truncated) division.
428
428
 
429
429
  Parameters:
430
430
 
431
- |param|type|description|
432
- |-----|----|-----------|
433
- |`num1`|`BigInt`|The first operand|
434
- |`num2`|`BigInt`|The second operand|
431
+ | param | type | description |
432
+ | ------ | -------- | ------------------ |
433
+ | `num1` | `BigInt` | The first operand |
434
+ | `num2` | `BigInt` | The second operand |
435
435
 
436
436
  Returns:
437
437
 
438
- |type|description|
439
- |----|-----------|
440
- |`(BigInt, BigInt)`|The quotient and remainder of its operands|
438
+ | type | description |
439
+ | ------------------ | ------------------------------------------ |
440
+ | `(BigInt, BigInt)` | The quotient and remainder of its operands |
441
441
 
442
442
  Examples:
443
443
 
@@ -453,23 +453,23 @@ No other changes yet.
453
453
  </details>
454
454
 
455
455
  ```grain
456
- gcd : (num1: BigInt, num2: BigInt) => BigInt
456
+ gcd: (num1: BigInt, num2: BigInt) => BigInt
457
457
  ```
458
458
 
459
459
  Computes the greatest common divisior of the two operands.
460
460
 
461
461
  Parameters:
462
462
 
463
- |param|type|description|
464
- |-----|----|-----------|
465
- |`num1`|`BigInt`|The first operand|
466
- |`num2`|`BigInt`|The second operand|
463
+ | param | type | description |
464
+ | ------ | -------- | ------------------ |
465
+ | `num1` | `BigInt` | The first operand |
466
+ | `num2` | `BigInt` | The second operand |
467
467
 
468
468
  Returns:
469
469
 
470
- |type|description|
471
- |----|-----------|
472
- |`BigInt`|The greatest common divisor of its operands|
470
+ | type | description |
471
+ | -------- | ------------------------------------------- |
472
+ | `BigInt` | The greatest common divisor of its operands |
473
473
 
474
474
  Examples:
475
475
 
@@ -492,23 +492,23 @@ BigInt.gcd(36t, 24t) == 12t
492
492
  </details>
493
493
 
494
494
  ```grain
495
- (<<) : (num: BigInt, places: Int32) => BigInt
495
+ (<<): (num: BigInt, places: Int32) => BigInt
496
496
  ```
497
497
 
498
498
  Shifts the bits of the value left by the given number of bits.
499
499
 
500
500
  Parameters:
501
501
 
502
- |param|type|description|
503
- |-----|----|-----------|
504
- |`num`|`BigInt`|The value to shift|
505
- |`places`|`Int32`|The number of bits to shift by|
502
+ | param | type | description |
503
+ | -------- | -------- | ------------------------------ |
504
+ | `num` | `BigInt` | The value to shift |
505
+ | `places` | `Int32` | The number of bits to shift by |
506
506
 
507
507
  Returns:
508
508
 
509
- |type|description|
510
- |----|-----------|
511
- |`BigInt`|The shifted value|
509
+ | type | description |
510
+ | -------- | ----------------- |
511
+ | `BigInt` | The shifted value |
512
512
 
513
513
  Examples:
514
514
 
@@ -532,23 +532,23 @@ assert (10t << 2l) == 40t
532
532
  </details>
533
533
 
534
534
  ```grain
535
- (>>) : (num: BigInt, places: Int32) => BigInt
535
+ (>>): (num: BigInt, places: Int32) => BigInt
536
536
  ```
537
537
 
538
538
  Shifts the bits of the value right by the given number of bits, preserving the sign bit.
539
539
 
540
540
  Parameters:
541
541
 
542
- |param|type|description|
543
- |-----|----|-----------|
544
- |`num`|`BigInt`|The value to shift|
545
- |`places`|`Int32`|The amount to shift by|
542
+ | param | type | description |
543
+ | -------- | -------- | ---------------------- |
544
+ | `num` | `BigInt` | The value to shift |
545
+ | `places` | `Int32` | The amount to shift by |
546
546
 
547
547
  Returns:
548
548
 
549
- |type|description|
550
- |----|-----------|
551
- |`BigInt`|The shifted value|
549
+ | type | description |
550
+ | -------- | ----------------- |
551
+ | `BigInt` | The shifted value |
552
552
 
553
553
  Examples:
554
554
 
@@ -565,22 +565,22 @@ No other changes yet.
565
565
  </details>
566
566
 
567
567
  ```grain
568
- eqz : (num: BigInt) => Bool
568
+ eqz: (num: BigInt) => Bool
569
569
  ```
570
570
 
571
571
  Checks if the given value is equal to zero.
572
572
 
573
573
  Parameters:
574
574
 
575
- |param|type|description|
576
- |-----|----|-----------|
577
- |`num`|`BigInt`|The value to inspect|
575
+ | param | type | description |
576
+ | ----- | -------- | -------------------- |
577
+ | `num` | `BigInt` | The value to inspect |
578
578
 
579
579
  Returns:
580
580
 
581
- |type|description|
582
- |----|-----------|
583
- |`Bool`|`true` if the first value is equal to zero or `false` otherwise|
581
+ | type | description |
582
+ | ------ | --------------------------------------------------------------- |
583
+ | `Bool` | `true` if the first value is equal to zero or `false` otherwise |
584
584
 
585
585
  Examples:
586
586
 
@@ -607,23 +607,23 @@ assert BigInt.eqz(1t) == false
607
607
  </details>
608
608
 
609
609
  ```grain
610
- (==) : (num1: BigInt, num2: BigInt) => Bool
610
+ (==): (num1: BigInt, num2: BigInt) => Bool
611
611
  ```
612
612
 
613
613
  Checks if the first value is equal to the second value.
614
614
 
615
615
  Parameters:
616
616
 
617
- |param|type|description|
618
- |-----|----|-----------|
619
- |`num1`|`BigInt`|The first value|
620
- |`num2`|`BigInt`|The second value|
617
+ | param | type | description |
618
+ | ------ | -------- | ---------------- |
619
+ | `num1` | `BigInt` | The first value |
620
+ | `num2` | `BigInt` | The second value |
621
621
 
622
622
  Returns:
623
623
 
624
- |type|description|
625
- |----|-----------|
626
- |`Bool`|`true` if the first value is equal to the second value or `false` otherwise|
624
+ | type | description |
625
+ | ------ | --------------------------------------------------------------------------- |
626
+ | `Bool` | `true` if the first value is equal to the second value or `false` otherwise |
627
627
 
628
628
  Examples:
629
629
 
@@ -652,23 +652,23 @@ assert -10t == -10t
652
652
  </details>
653
653
 
654
654
  ```grain
655
- (!=) : (num1: BigInt, num2: BigInt) => Bool
655
+ (!=): (num1: BigInt, num2: BigInt) => Bool
656
656
  ```
657
657
 
658
658
  Checks if the first value is not equal to the second value.
659
659
 
660
660
  Parameters:
661
661
 
662
- |param|type|description|
663
- |-----|----|-----------|
664
- |`num1`|`BigInt`|The first value|
665
- |`num2`|`BigInt`|The second value|
662
+ | param | type | description |
663
+ | ------ | -------- | ---------------- |
664
+ | `num1` | `BigInt` | The first value |
665
+ | `num2` | `BigInt` | The second value |
666
666
 
667
667
  Returns:
668
668
 
669
- |type|description|
670
- |----|-----------|
671
- |`Bool`|`true` if the first value is not equal to the second value or `false` otherwise|
669
+ | type | description |
670
+ | ------ | ------------------------------------------------------------------------------- |
671
+ | `Bool` | `true` if the first value is not equal to the second value or `false` otherwise |
672
672
 
673
673
  Examples:
674
674
 
@@ -697,23 +697,23 @@ assert -10t != -20t
697
697
  </details>
698
698
 
699
699
  ```grain
700
- (<) : (num1: BigInt, num2: BigInt) => Bool
700
+ (<): (num1: BigInt, num2: BigInt) => Bool
701
701
  ```
702
702
 
703
703
  Checks if the first value is less than the second value.
704
704
 
705
705
  Parameters:
706
706
 
707
- |param|type|description|
708
- |-----|----|-----------|
709
- |`num1`|`BigInt`|The first value|
710
- |`num2`|`BigInt`|The second value|
707
+ | param | type | description |
708
+ | ------ | -------- | ---------------- |
709
+ | `num1` | `BigInt` | The first value |
710
+ | `num2` | `BigInt` | The second value |
711
711
 
712
712
  Returns:
713
713
 
714
- |type|description|
715
- |----|-----------|
716
- |`Bool`|`true` if the first value is less than the second value or `false` otherwise|
714
+ | type | description |
715
+ | ------ | ---------------------------------------------------------------------------- |
716
+ | `Bool` | `true` if the first value is less than the second value or `false` otherwise |
717
717
 
718
718
  Examples:
719
719
 
@@ -742,23 +742,23 @@ assert -10t < 0t
742
742
  </details>
743
743
 
744
744
  ```grain
745
- (<=) : (num1: BigInt, num2: BigInt) => Bool
745
+ (<=): (num1: BigInt, num2: BigInt) => Bool
746
746
  ```
747
747
 
748
748
  Checks if the first value is less than or equal to the second value.
749
749
 
750
750
  Parameters:
751
751
 
752
- |param|type|description|
753
- |-----|----|-----------|
754
- |`num1`|`BigInt`|The first value|
755
- |`num2`|`BigInt`|The second value|
752
+ | param | type | description |
753
+ | ------ | -------- | ---------------- |
754
+ | `num1` | `BigInt` | The first value |
755
+ | `num2` | `BigInt` | The second value |
756
756
 
757
757
  Returns:
758
758
 
759
- |type|description|
760
- |----|-----------|
761
- |`Bool`|`true` if the first value is less than or equal to the second value or `false` otherwise|
759
+ | type | description |
760
+ | ------ | ---------------------------------------------------------------------------------------- |
761
+ | `Bool` | `true` if the first value is less than or equal to the second value or `false` otherwise |
762
762
 
763
763
  Examples:
764
764
 
@@ -792,23 +792,23 @@ assert 2t <= 3t
792
792
  </details>
793
793
 
794
794
  ```grain
795
- (>) : (num1: BigInt, num2: BigInt) => Bool
795
+ (>): (num1: BigInt, num2: BigInt) => Bool
796
796
  ```
797
797
 
798
798
  Checks if the first value is greater than the second value.
799
799
 
800
800
  Parameters:
801
801
 
802
- |param|type|description|
803
- |-----|----|-----------|
804
- |`num1`|`BigInt`|The first value|
805
- |`num2`|`BigInt`|The second value|
802
+ | param | type | description |
803
+ | ------ | -------- | ---------------- |
804
+ | `num1` | `BigInt` | The first value |
805
+ | `num2` | `BigInt` | The second value |
806
806
 
807
807
  Returns:
808
808
 
809
- |type|description|
810
- |----|-----------|
811
- |`Bool`|`true` if the first value is greater than the second value or `false` otherwise|
809
+ | type | description |
810
+ | ------ | ------------------------------------------------------------------------------- |
811
+ | `Bool` | `true` if the first value is greater than the second value or `false` otherwise |
812
812
 
813
813
  Examples:
814
814
 
@@ -837,23 +837,23 @@ assert 0t > -10t
837
837
  </details>
838
838
 
839
839
  ```grain
840
- (>=) : (num1: BigInt, num2: BigInt) => Bool
840
+ (>=): (num1: BigInt, num2: BigInt) => Bool
841
841
  ```
842
842
 
843
843
  Checks if the first value is greater than or equal to the second value.
844
844
 
845
845
  Parameters:
846
846
 
847
- |param|type|description|
848
- |-----|----|-----------|
849
- |`num1`|`BigInt`|The first value|
850
- |`num2`|`BigInt`|The second value|
847
+ | param | type | description |
848
+ | ------ | -------- | ---------------- |
849
+ | `num1` | `BigInt` | The first value |
850
+ | `num2` | `BigInt` | The second value |
851
851
 
852
852
  Returns:
853
853
 
854
- |type|description|
855
- |----|-----------|
856
- |`Bool`|`true` if the first value is greater than or equal to the second value or `false` otherwise|
854
+ | type | description |
855
+ | ------ | ------------------------------------------------------------------------------------------- |
856
+ | `Bool` | `true` if the first value is greater than or equal to the second value or `false` otherwise |
857
857
 
858
858
  Examples:
859
859
 
@@ -880,22 +880,22 @@ No other changes yet.
880
880
  </details>
881
881
 
882
882
  ```grain
883
- lnot : (num: BigInt) => BigInt
883
+ lnot: (num: BigInt) => BigInt
884
884
  ```
885
885
 
886
886
  Computes the bitwise NOT of the given value.
887
887
 
888
888
  Parameters:
889
889
 
890
- |param|type|description|
891
- |-----|----|-----------|
892
- |`num`|`BigInt`|The given value|
890
+ | param | type | description |
891
+ | ----- | -------- | --------------- |
892
+ | `num` | `BigInt` | The given value |
893
893
 
894
894
  Returns:
895
895
 
896
- |type|description|
897
- |----|-----------|
898
- |`BigInt`|Containing the inverted bits of the given value|
896
+ | type | description |
897
+ | -------- | ----------------------------------------------- |
898
+ | `BigInt` | Containing the inverted bits of the given value |
899
899
 
900
900
  Examples:
901
901
 
@@ -918,23 +918,23 @@ BigInt.lnot(91234t) == -91235t
918
918
  </details>
919
919
 
920
920
  ```grain
921
- (&) : (num1: BigInt, num2: BigInt) => BigInt
921
+ (&): (num1: BigInt, num2: BigInt) => BigInt
922
922
  ```
923
923
 
924
924
  Computes the bitwise AND (`&`) on the given operands.
925
925
 
926
926
  Parameters:
927
927
 
928
- |param|type|description|
929
- |-----|----|-----------|
930
- |`num1`|`BigInt`|The first operand|
931
- |`num2`|`BigInt`|The second operand|
928
+ | param | type | description |
929
+ | ------ | -------- | ------------------ |
930
+ | `num1` | `BigInt` | The first operand |
931
+ | `num2` | `BigInt` | The second operand |
932
932
 
933
933
  Returns:
934
934
 
935
- |type|description|
936
- |----|-----------|
937
- |`BigInt`|Containing a `1` in each bit position for which the corresponding bits of both operands are `1`|
935
+ | type | description |
936
+ | -------- | ----------------------------------------------------------------------------------------------- |
937
+ | `BigInt` | Containing a `1` in each bit position for which the corresponding bits of both operands are `1` |
938
938
 
939
939
  Examples:
940
940
 
@@ -958,23 +958,23 @@ assert (4t & 3t) == 0t
958
958
  </details>
959
959
 
960
960
  ```grain
961
- (|) : (num1: BigInt, num2: BigInt) => BigInt
961
+ (|): (num1: BigInt, num2: BigInt) => BigInt
962
962
  ```
963
963
 
964
964
  Computes the bitwise OR (`|`) on the given operands.
965
965
 
966
966
  Parameters:
967
967
 
968
- |param|type|description|
969
- |-----|----|-----------|
970
- |`num1`|`BigInt`|The first operand|
971
- |`num2`|`BigInt`|The second operand|
968
+ | param | type | description |
969
+ | ------ | -------- | ------------------ |
970
+ | `num1` | `BigInt` | The first operand |
971
+ | `num2` | `BigInt` | The second operand |
972
972
 
973
973
  Returns:
974
974
 
975
- |type|description|
976
- |----|-----------|
977
- |`BigInt`|Containing a `1` in each bit position for which the corresponding bits of either or both operands are `1`|
975
+ | type | description |
976
+ | -------- | --------------------------------------------------------------------------------------------------------- |
977
+ | `BigInt` | Containing a `1` in each bit position for which the corresponding bits of either or both operands are `1` |
978
978
 
979
979
  Examples:
980
980
 
@@ -998,23 +998,23 @@ assert (5t | 3t) == 7t
998
998
  </details>
999
999
 
1000
1000
  ```grain
1001
- (^) : (num1: BigInt, num2: BigInt) => BigInt
1001
+ (^): (num1: BigInt, num2: BigInt) => BigInt
1002
1002
  ```
1003
1003
 
1004
1004
  Computes the bitwise XOR (`^`) on the given operands.
1005
1005
 
1006
1006
  Parameters:
1007
1007
 
1008
- |param|type|description|
1009
- |-----|----|-----------|
1010
- |`num1`|`BigInt`|The first operand|
1011
- |`num2`|`BigInt`|The second operand|
1008
+ | param | type | description |
1009
+ | ------ | -------- | ------------------ |
1010
+ | `num1` | `BigInt` | The first operand |
1011
+ | `num2` | `BigInt` | The second operand |
1012
1012
 
1013
1013
  Returns:
1014
1014
 
1015
- |type|description|
1016
- |----|-----------|
1017
- |`BigInt`|Containing a `1` in each bit position for which the corresponding bits of either but not both operands are `1`|
1015
+ | type | description |
1016
+ | -------- | -------------------------------------------------------------------------------------------------------------- |
1017
+ | `BigInt` | Containing a `1` in each bit position for which the corresponding bits of either but not both operands are `1` |
1018
1018
 
1019
1019
  Examples:
1020
1020
 
@@ -1031,7 +1031,7 @@ No other changes yet.
1031
1031
  </details>
1032
1032
 
1033
1033
  ```grain
1034
- clz : (num: BigInt) => Int32
1034
+ clz: (num: BigInt) => Int32
1035
1035
  ```
1036
1036
 
1037
1037
  Counts the number of leading zero bits in the value.
@@ -1039,15 +1039,15 @@ Will return the maximum integer for negative numbers.
1039
1039
 
1040
1040
  Parameters:
1041
1041
 
1042
- |param|type|description|
1043
- |-----|----|-----------|
1044
- |`num`|`BigInt`|The value to inspect|
1042
+ | param | type | description |
1043
+ | ----- | -------- | -------------------- |
1044
+ | `num` | `BigInt` | The value to inspect |
1045
1045
 
1046
1046
  Returns:
1047
1047
 
1048
- |type|description|
1049
- |----|-----------|
1050
- |`Int32`|The amount of leading zeros|
1048
+ | type | description |
1049
+ | ------- | --------------------------- |
1050
+ | `Int32` | The amount of leading zeros |
1051
1051
 
1052
1052
  Examples:
1053
1053
 
@@ -1063,22 +1063,22 @@ No other changes yet.
1063
1063
  </details>
1064
1064
 
1065
1065
  ```grain
1066
- ctz : (num: BigInt) => Int64
1066
+ ctz: (num: BigInt) => Int64
1067
1067
  ```
1068
1068
 
1069
1069
  Counts the number of trailing zero bits in the value.
1070
1070
 
1071
1071
  Parameters:
1072
1072
 
1073
- |param|type|description|
1074
- |-----|----|-----------|
1075
- |`num`|`BigInt`|The value to inspect|
1073
+ | param | type | description |
1074
+ | ----- | -------- | -------------------- |
1075
+ | `num` | `BigInt` | The value to inspect |
1076
1076
 
1077
1077
  Returns:
1078
1078
 
1079
- |type|description|
1080
- |----|-----------|
1081
- |`Int64`|The amount of trailing zeros|
1079
+ | type | description |
1080
+ | ------- | ---------------------------- |
1081
+ | `Int64` | The amount of trailing zeros |
1082
1082
 
1083
1083
  Examples:
1084
1084
 
@@ -1094,7 +1094,7 @@ No other changes yet.
1094
1094
  </details>
1095
1095
 
1096
1096
  ```grain
1097
- popcnt : (num: BigInt) => Option<Int64>
1097
+ popcnt: (num: BigInt) => Option<Int64>
1098
1098
  ```
1099
1099
 
1100
1100
  Counts the number of bits set to `1` in the value, also known as a population count.
@@ -1102,15 +1102,15 @@ Will return the `None` if given a negative integer
1102
1102
 
1103
1103
  Parameters:
1104
1104
 
1105
- |param|type|description|
1106
- |-----|----|-----------|
1107
- |`num`|`BigInt`|The value to inspect|
1105
+ | param | type | description |
1106
+ | ----- | -------- | -------------------- |
1107
+ | `num` | `BigInt` | The value to inspect |
1108
1108
 
1109
1109
  Returns:
1110
1110
 
1111
- |type|description|
1112
- |----|-----------|
1113
- |`Option<Int64>`|The amount of 1-bits in its operand|
1111
+ | type | description |
1112
+ | --------------- | ----------------------------------- |
1113
+ | `Option<Int64>` | The amount of 1-bits in its operand |
1114
1114
 
1115
1115
  Examples:
1116
1116
 
@@ -1126,22 +1126,22 @@ No other changes yet.
1126
1126
  </details>
1127
1127
 
1128
1128
  ```grain
1129
- toString : (num: BigInt) => String
1129
+ toString: (num: BigInt) => String
1130
1130
  ```
1131
1131
 
1132
1132
  Converts the given operand to a string.
1133
1133
 
1134
1134
  Parameters:
1135
1135
 
1136
- |param|type|description|
1137
- |-----|----|-----------|
1138
- |`num`|`BigInt`|The operand|
1136
+ | param | type | description |
1137
+ | ----- | -------- | ----------- |
1138
+ | `num` | `BigInt` | The operand |
1139
1139
 
1140
1140
  Returns:
1141
1141
 
1142
- |type|description|
1143
- |----|-----------|
1144
- |`String`|The operand, as a string|
1142
+ | type | description |
1143
+ | -------- | ------------------------ |
1144
+ | `String` | The operand, as a string |
1145
1145
 
1146
1146
  Examples:
1147
1147