@grain/stdlib 0.6.5 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/LICENSE +1 -1
  3. package/README.md +2 -2
  4. package/array.gr +55 -7
  5. package/array.md +123 -77
  6. package/bigint.md +30 -30
  7. package/buffer.gr +20 -53
  8. package/buffer.md +47 -47
  9. package/bytes.gr +111 -35
  10. package/bytes.md +111 -32
  11. package/char.gr +201 -99
  12. package/char.md +361 -34
  13. package/exception.gr +11 -11
  14. package/exception.md +26 -1
  15. package/float32.gr +327 -3
  16. package/float32.md +606 -19
  17. package/float64.gr +320 -3
  18. package/float64.md +606 -19
  19. package/fs.gr +1082 -0
  20. package/fs.md +630 -0
  21. package/hash.gr +142 -88
  22. package/hash.md +102 -14
  23. package/int16.md +23 -23
  24. package/int32.gr +25 -4
  25. package/int32.md +65 -30
  26. package/int64.gr +26 -1
  27. package/int64.md +65 -30
  28. package/int8.md +23 -23
  29. package/json.gr +366 -51
  30. package/json.md +418 -2
  31. package/list.gr +387 -49
  32. package/list.md +492 -69
  33. package/map.gr +20 -12
  34. package/map.md +44 -38
  35. package/marshal.gr +41 -40
  36. package/marshal.md +2 -2
  37. package/number.gr +159 -30
  38. package/number.md +215 -38
  39. package/option.md +21 -21
  40. package/package.json +5 -3
  41. package/path.gr +48 -0
  42. package/path.md +103 -12
  43. package/pervasives.gr +2 -2
  44. package/pervasives.md +37 -37
  45. package/priorityqueue.gr +7 -7
  46. package/priorityqueue.md +19 -19
  47. package/queue.gr +183 -29
  48. package/queue.md +296 -40
  49. package/random.md +6 -6
  50. package/range.gr +4 -4
  51. package/range.md +6 -6
  52. package/rational.md +16 -16
  53. package/regex.gr +52 -51
  54. package/regex.md +11 -11
  55. package/result.md +16 -16
  56. package/runtime/atof/common.md +39 -39
  57. package/runtime/atof/decimal.gr +6 -6
  58. package/runtime/atof/decimal.md +8 -8
  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 +1 -1
  71. package/runtime/dataStructures.md +33 -33
  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 +1 -1
  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 +4 -4
  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 +79 -73
  98. package/runtime/string.gr +37 -105
  99. package/runtime/string.md +3 -9
  100. package/runtime/unsafe/constants.md +24 -24
  101. package/runtime/unsafe/conv.md +13 -13
  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 +138 -138
  117. package/set.gr +18 -11
  118. package/set.md +42 -36
  119. package/stack.gr +171 -2
  120. package/stack.md +297 -15
  121. package/string.gr +352 -557
  122. package/string.md +77 -34
  123. package/uint16.gr +81 -0
  124. package/uint16.md +183 -22
  125. package/uint32.gr +25 -4
  126. package/uint32.md +63 -28
  127. package/uint64.gr +25 -5
  128. package/uint64.md +63 -28
  129. package/uint8.gr +81 -0
  130. package/uint8.md +183 -22
  131. package/uri.gr +57 -53
  132. package/uri.md +11 -12
  133. package/wasi/file.gr +67 -59
  134. package/wasi/file.md +39 -39
  135. package/wasi/process.md +5 -5
  136. package/wasi/random.md +3 -3
  137. package/wasi/time.md +4 -4
  138. package/runtime/utils/printing.gr +0 -60
  139. package/runtime/utils/printing.md +0 -26
package/uint32.md CHANGED
@@ -25,7 +25,7 @@ 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.
@@ -50,7 +50,7 @@ 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.
@@ -75,7 +75,7 @@ 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.
@@ -92,6 +92,41 @@ Returns:
92
92
  |----|-----------|
93
93
  |`Uint32`|The Int32 represented as a Uint32|
94
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
+ ```
129
+
95
130
  ### Uint32.**incr**
96
131
 
97
132
  <details disabled>
@@ -100,7 +135,7 @@ 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.
@@ -125,7 +160,7 @@ 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.
@@ -150,7 +185,7 @@ 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.
@@ -176,7 +211,7 @@ 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.
@@ -202,7 +237,7 @@ 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.
@@ -228,7 +263,7 @@ 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.
@@ -254,7 +289,7 @@ 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.
@@ -280,7 +315,7 @@ 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.
@@ -306,7 +341,7 @@ 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.
@@ -332,7 +367,7 @@ 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.
@@ -358,7 +393,7 @@ 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.
@@ -384,7 +419,7 @@ 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.
@@ -410,7 +445,7 @@ 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.
@@ -436,7 +471,7 @@ 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.
@@ -461,7 +496,7 @@ 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.
@@ -487,7 +522,7 @@ 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.
@@ -513,7 +548,7 @@ 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.
@@ -539,7 +574,7 @@ 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.
@@ -565,7 +600,7 @@ 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.
@@ -590,7 +625,7 @@ 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.
@@ -616,7 +651,7 @@ 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.
@@ -642,7 +677,7 @@ 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.
@@ -668,7 +703,7 @@ 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.
@@ -693,7 +728,7 @@ 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.
@@ -718,7 +753,7 @@ 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.
package/uint64.gr CHANGED
@@ -6,6 +6,12 @@
6
6
  */
7
7
  module Uint64
8
8
 
9
+ from "runtime/unsafe/offsets" include Offsets
10
+ use Offsets.{
11
+ _UINT64_VALUE_OFFSET as _VALUE_OFFSET,
12
+ _INT64_VALUE_OFFSET,
13
+ _FLOAT64_VALUE_OFFSET,
14
+ }
9
15
  from "runtime/unsafe/wasmi32" include WasmI32
10
16
  from "runtime/unsafe/wasmi64" include WasmI64
11
17
  use WasmI64.{ (==), (!=), (&), (|), (^), (+), (-), (*), (<<), (>>>) }
@@ -16,10 +22,6 @@ use Numbers.{ reducedUnsignedInteger, coerceNumberToUnsignedWasmI64 }
16
22
  from "runtime/dataStructures" include DataStructures
17
23
  use DataStructures.{ newUint64 }
18
24
 
19
- // First 8 bytes of 64-bit unsigned int are heap tag and 32 bits of padding
20
- @unsafe
21
- let _VALUE_OFFSET = 8n
22
-
23
25
  /**
24
26
  * Converts a Number to a Uint64.
25
27
  *
@@ -61,7 +63,25 @@ provide let toNumber = (value: Uint64) => {
61
63
  */
62
64
  @unsafe
63
65
  provide let fromInt64 = (number: Int64) => {
64
- let x = WasmI64.load(WasmI32.fromGrain(number), 8n)
66
+ let x = WasmI64.load(WasmI32.fromGrain(number), _INT64_VALUE_OFFSET)
67
+ let result = newUint64(x)
68
+ WasmI32.toGrain(result): Uint64
69
+ }
70
+
71
+ /**
72
+ * Interprets a Float64 as an Uint64.
73
+ *
74
+ * @param value: The value to convert
75
+ * @returns The Float64 interpreted as an Uint64
76
+ *
77
+ * @example assert Uint64.reinterpretFloat64(1.0d) == 4607182418800017408uL
78
+ * @example assert Uint64.reinterpretFloat64(-1.0d) == 13830554455654793216uL
79
+ *
80
+ * @since v0.7.0
81
+ */
82
+ @unsafe
83
+ provide let reinterpretFloat64 = (value: Float64) => {
84
+ let x = WasmI64.load(WasmI32.fromGrain(value), _FLOAT64_VALUE_OFFSET)
65
85
  let result = newUint64(x)
66
86
  WasmI32.toGrain(result): Uint64
67
87
  }
package/uint64.md CHANGED
@@ -25,7 +25,7 @@ No other changes yet.
25
25
  </details>
26
26
 
27
27
  ```grain
28
- fromNumber : (number: Number) => Uint64
28
+ fromNumber: (number: Number) => Uint64
29
29
  ```
30
30
 
31
31
  Converts a Number to a Uint64.
@@ -50,7 +50,7 @@ No other changes yet.
50
50
  </details>
51
51
 
52
52
  ```grain
53
- toNumber : (value: Uint64) => Number
53
+ toNumber: (value: Uint64) => Number
54
54
  ```
55
55
 
56
56
  Converts a Uint64 to a Number.
@@ -75,7 +75,7 @@ No other changes yet.
75
75
  </details>
76
76
 
77
77
  ```grain
78
- fromInt64 : (number: Int64) => Uint64
78
+ fromInt64: (number: Int64) => Uint64
79
79
  ```
80
80
 
81
81
  Converts an Int64 to a Uint64.
@@ -92,6 +92,41 @@ Returns:
92
92
  |----|-----------|
93
93
  |`Uint64`|The Int64 represented as a Uint64|
94
94
 
95
+ ### Uint64.**reinterpretFloat64**
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
+ reinterpretFloat64: (value: Float64) => Uint64
104
+ ```
105
+
106
+ Interprets a Float64 as an Uint64.
107
+
108
+ Parameters:
109
+
110
+ |param|type|description|
111
+ |-----|----|-----------|
112
+ |`value`|`Float64`|The value to convert|
113
+
114
+ Returns:
115
+
116
+ |type|description|
117
+ |----|-----------|
118
+ |`Uint64`|The Float64 interpreted as an Uint64|
119
+
120
+ Examples:
121
+
122
+ ```grain
123
+ assert Uint64.reinterpretFloat64(1.0d) == 4607182418800017408uL
124
+ ```
125
+
126
+ ```grain
127
+ assert Uint64.reinterpretFloat64(-1.0d) == 13830554455654793216uL
128
+ ```
129
+
95
130
  ### Uint64.**incr**
96
131
 
97
132
  <details disabled>
@@ -100,7 +135,7 @@ No other changes yet.
100
135
  </details>
101
136
 
102
137
  ```grain
103
- incr : (value: Uint64) => Uint64
138
+ incr: (value: Uint64) => Uint64
104
139
  ```
105
140
 
106
141
  Increments the value by one.
@@ -125,7 +160,7 @@ No other changes yet.
125
160
  </details>
126
161
 
127
162
  ```grain
128
- decr : (value: Uint64) => Uint64
163
+ decr: (value: Uint64) => Uint64
129
164
  ```
130
165
 
131
166
  Decrements the value by one.
@@ -150,7 +185,7 @@ No other changes yet.
150
185
  </details>
151
186
 
152
187
  ```grain
153
- (+) : (x: Uint64, y: Uint64) => Uint64
188
+ (+): (x: Uint64, y: Uint64) => Uint64
154
189
  ```
155
190
 
156
191
  Computes the sum of its operands.
@@ -176,7 +211,7 @@ No other changes yet.
176
211
  </details>
177
212
 
178
213
  ```grain
179
- (-) : (x: Uint64, y: Uint64) => Uint64
214
+ (-): (x: Uint64, y: Uint64) => Uint64
180
215
  ```
181
216
 
182
217
  Computes the difference of its operands.
@@ -202,7 +237,7 @@ No other changes yet.
202
237
  </details>
203
238
 
204
239
  ```grain
205
- (*) : (x: Uint64, y: Uint64) => Uint64
240
+ (*): (x: Uint64, y: Uint64) => Uint64
206
241
  ```
207
242
 
208
243
  Computes the product of its operands.
@@ -228,7 +263,7 @@ No other changes yet.
228
263
  </details>
229
264
 
230
265
  ```grain
231
- (/) : (x: Uint64, y: Uint64) => Uint64
266
+ (/): (x: Uint64, y: Uint64) => Uint64
232
267
  ```
233
268
 
234
269
  Computes the quotient of its operands.
@@ -254,7 +289,7 @@ No other changes yet.
254
289
  </details>
255
290
 
256
291
  ```grain
257
- rem : (x: Uint64, y: Uint64) => Uint64
292
+ rem: (x: Uint64, y: Uint64) => Uint64
258
293
  ```
259
294
 
260
295
  Computes the remainder of the division of its operands.
@@ -280,7 +315,7 @@ No other changes yet.
280
315
  </details>
281
316
 
282
317
  ```grain
283
- rotl : (value: Uint64, amount: Uint64) => Uint64
318
+ rotl: (value: Uint64, amount: Uint64) => Uint64
284
319
  ```
285
320
 
286
321
  Rotates the bits of the value left by the given number of bits.
@@ -306,7 +341,7 @@ No other changes yet.
306
341
  </details>
307
342
 
308
343
  ```grain
309
- rotr : (value: Uint64, amount: Uint64) => Uint64
344
+ rotr: (value: Uint64, amount: Uint64) => Uint64
310
345
  ```
311
346
 
312
347
  Rotates the bits of the value right by the given number of bits.
@@ -332,7 +367,7 @@ No other changes yet.
332
367
  </details>
333
368
 
334
369
  ```grain
335
- (<<) : (value: Uint64, amount: Uint64) => Uint64
370
+ (<<): (value: Uint64, amount: Uint64) => Uint64
336
371
  ```
337
372
 
338
373
  Shifts the bits of the value left by the given number of bits.
@@ -358,7 +393,7 @@ No other changes yet.
358
393
  </details>
359
394
 
360
395
  ```grain
361
- (>>>) : (value: Uint64, amount: Uint64) => Uint64
396
+ (>>>): (value: Uint64, amount: Uint64) => Uint64
362
397
  ```
363
398
 
364
399
  Shifts the bits of the value right by the given number of bits.
@@ -384,7 +419,7 @@ No other changes yet.
384
419
  </details>
385
420
 
386
421
  ```grain
387
- (==) : (x: Uint64, y: Uint64) => Bool
422
+ (==): (x: Uint64, y: Uint64) => Bool
388
423
  ```
389
424
 
390
425
  Checks if the first value is equal to the second value.
@@ -410,7 +445,7 @@ No other changes yet.
410
445
  </details>
411
446
 
412
447
  ```grain
413
- (!=) : (x: Uint64, y: Uint64) => Bool
448
+ (!=): (x: Uint64, y: Uint64) => Bool
414
449
  ```
415
450
 
416
451
  Checks if the first value is not equal to the second value.
@@ -436,7 +471,7 @@ No other changes yet.
436
471
  </details>
437
472
 
438
473
  ```grain
439
- eqz : (value: Uint64) => Bool
474
+ eqz: (value: Uint64) => Bool
440
475
  ```
441
476
 
442
477
  Checks if the given value is equal to zero.
@@ -461,7 +496,7 @@ No other changes yet.
461
496
  </details>
462
497
 
463
498
  ```grain
464
- (<) : (x: Uint64, y: Uint64) => Bool
499
+ (<): (x: Uint64, y: Uint64) => Bool
465
500
  ```
466
501
 
467
502
  Checks if the first value is less than the second value.
@@ -487,7 +522,7 @@ No other changes yet.
487
522
  </details>
488
523
 
489
524
  ```grain
490
- (>) : (x: Uint64, y: Uint64) => Bool
525
+ (>): (x: Uint64, y: Uint64) => Bool
491
526
  ```
492
527
 
493
528
  Checks if the first value is greater than the second value.
@@ -513,7 +548,7 @@ No other changes yet.
513
548
  </details>
514
549
 
515
550
  ```grain
516
- (<=) : (x: Uint64, y: Uint64) => Bool
551
+ (<=): (x: Uint64, y: Uint64) => Bool
517
552
  ```
518
553
 
519
554
  Checks if the first value is less than or equal to the second value.
@@ -539,7 +574,7 @@ No other changes yet.
539
574
  </details>
540
575
 
541
576
  ```grain
542
- (>=) : (x: Uint64, y: Uint64) => Bool
577
+ (>=): (x: Uint64, y: Uint64) => Bool
543
578
  ```
544
579
 
545
580
  Checks if the first value is greater than or equal to the second value.
@@ -565,7 +600,7 @@ No other changes yet.
565
600
  </details>
566
601
 
567
602
  ```grain
568
- lnot : (value: Uint64) => Uint64
603
+ lnot: (value: Uint64) => Uint64
569
604
  ```
570
605
 
571
606
  Computes the bitwise NOT of the given value.
@@ -590,7 +625,7 @@ No other changes yet.
590
625
  </details>
591
626
 
592
627
  ```grain
593
- (&) : (x: Uint64, y: Uint64) => Uint64
628
+ (&): (x: Uint64, y: Uint64) => Uint64
594
629
  ```
595
630
 
596
631
  Computes the bitwise AND (`&`) on the given operands.
@@ -616,7 +651,7 @@ No other changes yet.
616
651
  </details>
617
652
 
618
653
  ```grain
619
- (|) : (x: Uint64, y: Uint64) => Uint64
654
+ (|): (x: Uint64, y: Uint64) => Uint64
620
655
  ```
621
656
 
622
657
  Computes the bitwise OR (`|`) on the given operands.
@@ -642,7 +677,7 @@ No other changes yet.
642
677
  </details>
643
678
 
644
679
  ```grain
645
- (^) : (x: Uint64, y: Uint64) => Uint64
680
+ (^): (x: Uint64, y: Uint64) => Uint64
646
681
  ```
647
682
 
648
683
  Computes the bitwise XOR (`^`) on the given operands.
@@ -668,7 +703,7 @@ No other changes yet.
668
703
  </details>
669
704
 
670
705
  ```grain
671
- clz : (value: Uint64) => Uint64
706
+ clz: (value: Uint64) => Uint64
672
707
  ```
673
708
 
674
709
  Counts the number of leading zero bits in the value.
@@ -693,7 +728,7 @@ No other changes yet.
693
728
  </details>
694
729
 
695
730
  ```grain
696
- ctz : (value: Uint64) => Uint64
731
+ ctz: (value: Uint64) => Uint64
697
732
  ```
698
733
 
699
734
  Counts the number of trailing zero bits in the value.
@@ -718,7 +753,7 @@ No other changes yet.
718
753
  </details>
719
754
 
720
755
  ```grain
721
- popcnt : (value: Uint64) => Uint64
756
+ popcnt: (value: Uint64) => Uint64
722
757
  ```
723
758
 
724
759
  Counts the number of bits set to `1` in the value, also known as a population count.