@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/array.md CHANGED
@@ -39,22 +39,22 @@ No other changes yet.
39
39
  </details>
40
40
 
41
41
  ```grain
42
- length : (array: Array<a>) => Number
42
+ length: (array: Array<a>) => Number
43
43
  ```
44
44
 
45
45
  Provides the length of the input array.
46
46
 
47
47
  Parameters:
48
48
 
49
- |param|type|description|
50
- |-----|----|-----------|
51
- |`array`|`Array<a>`|The array to inspect|
49
+ | param | type | description |
50
+ | ------- | ---------- | -------------------- |
51
+ | `array` | `Array<a>` | The array to inspect |
52
52
 
53
53
  Returns:
54
54
 
55
- |type|description|
56
- |----|-----------|
57
- |`Number`|The number of elements in the array|
55
+ | type | description |
56
+ | -------- | ----------------------------------- |
57
+ | `Number` | The number of elements in the array |
58
58
 
59
59
  Examples:
60
60
 
@@ -70,7 +70,7 @@ No other changes yet.
70
70
  </details>
71
71
 
72
72
  ```grain
73
- make : (length: Number, item: a) => Array<a>
73
+ make: (length: Number, item: a) => Array<a>
74
74
  ```
75
75
 
76
76
  Creates a new array of the specified length with each element being
@@ -78,16 +78,16 @@ initialized with the given value.
78
78
 
79
79
  Parameters:
80
80
 
81
- |param|type|description|
82
- |-----|----|-----------|
83
- |`length`|`Number`|The length of the new array|
84
- |`item`|`a`|The value to store at each index|
81
+ | param | type | description |
82
+ | -------- | -------- | -------------------------------- |
83
+ | `length` | `Number` | The length of the new array |
84
+ | `item` | `a` | The value to store at each index |
85
85
 
86
86
  Returns:
87
87
 
88
- |type|description|
89
- |----|-----------|
90
- |`Array<a>`|The new array|
88
+ | type | description |
89
+ | ---------- | ------------- |
90
+ | `Array<a>` | The new array |
91
91
 
92
92
  Throws:
93
93
 
@@ -110,7 +110,7 @@ No other changes yet.
110
110
  </details>
111
111
 
112
112
  ```grain
113
- init : (length: Number, fn: (Number => a)) => Array<a>
113
+ init: (length: Number, fn: (Number => a)) => Array<a>
114
114
  ```
115
115
 
116
116
  Creates a new array of the specified length where each element is
@@ -119,16 +119,16 @@ is called with the index of each array element.
119
119
 
120
120
  Parameters:
121
121
 
122
- |param|type|description|
123
- |-----|----|-----------|
124
- |`length`|`Number`|The length of the new array|
125
- |`fn`|`Number => a`|The initializer function to call with each index, where the value returned will be used to initialize the element|
122
+ | param | type | description |
123
+ | -------- | ------------- | ----------------------------------------------------------------------------------------------------------------- |
124
+ | `length` | `Number` | The length of the new array |
125
+ | `fn` | `Number => a` | The initializer function to call with each index, where the value returned will be used to initialize the element |
126
126
 
127
127
  Returns:
128
128
 
129
- |type|description|
130
- |----|-----------|
131
- |`Array<a>`|The new array|
129
+ | type | description |
130
+ | ---------- | ------------- |
131
+ | `Array<a>` | The new array |
132
132
 
133
133
  Throws:
134
134
 
@@ -143,6 +143,53 @@ Examples:
143
143
  Array.init(5, n => n + 3) == [> 3, 4, 5, 6, 7]
144
144
  ```
145
145
 
146
+ ### Array.**tryInit**
147
+
148
+ <details disabled>
149
+ <summary tabindex="-1">Added in <code>0.7.0</code></summary>
150
+ No other changes yet.
151
+ </details>
152
+
153
+ ```grain
154
+ tryInit:
155
+ (length: Number, fn: (Number => Result<a, b>)) => Result<Array<a>, b>
156
+ ```
157
+
158
+ Creates a new array where each element is initialized with the `Ok`
159
+ result value of an initializer function. The initializer is called with the
160
+ index of each element, and returns the new array if all calls to the
161
+ initializer succeed or the first error otherwise.
162
+
163
+ Parameters:
164
+
165
+ | param | type | description |
166
+ | -------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
167
+ | `length` | `Number` | The length of the new array |
168
+ | `fn` | `Number => Result<a, b>` | The initializer function to call with each index, where the `Ok` value returned will be used to initialize each element |
169
+
170
+ Returns:
171
+
172
+ | type | description |
173
+ | --------------------- | ----------------------------------------------------------------------------------------------------------------------- |
174
+ | `Result<Array<a>, b>` | `Ok(array)` if all elements were successfully initialized or `Err(error)` if the initializer function returned an error |
175
+
176
+ Throws:
177
+
178
+ `InvalidArgument(String)`
179
+
180
+ * When `length` is not an integer
181
+ * When `length` is negative
182
+
183
+ Examples:
184
+
185
+ ```grain
186
+ Array.tryInit(5, n => Ok(n + 3)) == [> 3, 4, 5, 6, 7]
187
+ ```
188
+
189
+ ```grain
190
+ Array.tryInit(5, n => if (n == 1) Err("stop") else Ok(n)) == Err("stop")
191
+ ```
192
+
146
193
  ### Array.**get**
147
194
 
148
195
  <details>
@@ -158,7 +205,7 @@ Array.init(5, n => n + 3) == [> 3, 4, 5, 6, 7]
158
205
  </details>
159
206
 
160
207
  ```grain
161
- get : (index: Number, array: Array<a>) => a
208
+ get: (index: Number, array: Array<a>) => a
162
209
  ```
163
210
 
164
211
  An alias for normal syntactic array access, i.e. `array[n]`.
@@ -168,16 +215,16 @@ A negative index is treated as an offset from the end of the array.
168
215
 
169
216
  Parameters:
170
217
 
171
- |param|type|description|
172
- |-----|----|-----------|
173
- |`index`|`Number`|The index to access|
174
- |`array`|`Array<a>`|The array to access|
218
+ | param | type | description |
219
+ | ------- | ---------- | ------------------- |
220
+ | `index` | `Number` | The index to access |
221
+ | `array` | `Array<a>` | The array to access |
175
222
 
176
223
  Returns:
177
224
 
178
- |type|description|
179
- |----|-----------|
180
- |`a`|The element from the array|
225
+ | type | description |
226
+ | ---- | -------------------------- |
227
+ | `a` | The element from the array |
181
228
 
182
229
  Throws:
183
230
 
@@ -207,7 +254,7 @@ Array.get(1, [> 1, 2, 3, 4, 5]) == 2
207
254
  </details>
208
255
 
209
256
  ```grain
210
- set : (index: Number, value: a, array: Array<a>) => Void
257
+ set: (index: Number, value: a, array: Array<a>) => Void
211
258
  ```
212
259
 
213
260
  An alias for normal syntactic array set, i.e. `array[n] = value`.
@@ -217,11 +264,11 @@ A negative index is treated as an offset from the end of the array.
217
264
 
218
265
  Parameters:
219
266
 
220
- |param|type|description|
221
- |-----|----|-----------|
222
- |`index`|`Number`|The index to update|
223
- |`value`|`a`|The value to store|
224
- |`array`|`Array<a>`|The array to update|
267
+ | param | type | description |
268
+ | ------- | ---------- | ------------------- |
269
+ | `index` | `Number` | The index to update |
270
+ | `value` | `a` | The value to store |
271
+ | `array` | `Array<a>` | The array to update |
225
272
 
226
273
  Throws:
227
274
 
@@ -246,7 +293,7 @@ No other changes yet.
246
293
  </details>
247
294
 
248
295
  ```grain
249
- append : (array1: Array<a>, array2: Array<a>) => Array<a>
296
+ append: (array1: Array<a>, array2: Array<a>) => Array<a>
250
297
  ```
251
298
 
252
299
  Creates a new array with the elements of the first array followed by
@@ -254,16 +301,16 @@ the elements of the second array. This does not modify the arguments.
254
301
 
255
302
  Parameters:
256
303
 
257
- |param|type|description|
258
- |-----|----|-----------|
259
- |`array1`|`Array<a>`|The array containing elements to appear first|
260
- |`array2`|`Array<a>`|The array containing elements to appear second|
304
+ | param | type | description |
305
+ | -------- | ---------- | ---------------------------------------------- |
306
+ | `array1` | `Array<a>` | The array containing elements to appear first |
307
+ | `array2` | `Array<a>` | The array containing elements to appear second |
261
308
 
262
309
  Returns:
263
310
 
264
- |type|description|
265
- |----|-----------|
266
- |`Array<a>`|The new array containing elements from `array1` followed by elements from `array2`|
311
+ | type | description |
312
+ | ---------- | ---------------------------------------------------------------------------------- |
313
+ | `Array<a>` | The new array containing elements from `array1` followed by elements from `array2` |
267
314
 
268
315
  Throws:
269
316
 
@@ -285,7 +332,7 @@ No other changes yet.
285
332
  </details>
286
333
 
287
334
  ```grain
288
- concat : (arrays: List<Array<a>>) => Array<a>
335
+ concat: (arrays: List<Array<a>>) => Array<a>
289
336
  ```
290
337
 
291
338
  Creates a single array containing the elements of all arrays in the
@@ -293,15 +340,15 @@ provided list. Does not modify any of the input arguments.
293
340
 
294
341
  Parameters:
295
342
 
296
- |param|type|description|
297
- |-----|----|-----------|
298
- |`arrays`|`List<Array<a>>`|A list containing all arrays to combine|
343
+ | param | type | description |
344
+ | -------- | ---------------- | --------------------------------------- |
345
+ | `arrays` | `List<Array<a>>` | A list containing all arrays to combine |
299
346
 
300
347
  Returns:
301
348
 
302
- |type|description|
303
- |----|-----------|
304
- |`Array<a>`|The new array|
349
+ | type | description |
350
+ | ---------- | ------------- |
351
+ | `Array<a>` | The new array |
305
352
 
306
353
  Throws:
307
354
 
@@ -323,7 +370,7 @@ No other changes yet.
323
370
  </details>
324
371
 
325
372
  ```grain
326
- copy : (array: Array<a>) => Array<a>
373
+ copy: (array: Array<a>) => Array<a>
327
374
  ```
328
375
 
329
376
  Produces a shallow copy of the input array. The new array contains the
@@ -331,15 +378,15 @@ same elements as the original.
331
378
 
332
379
  Parameters:
333
380
 
334
- |param|type|description|
335
- |-----|----|-----------|
336
- |`array`|`Array<a>`|The array to copy|
381
+ | param | type | description |
382
+ | ------- | ---------- | ----------------- |
383
+ | `array` | `Array<a>` | The array to copy |
337
384
 
338
385
  Returns:
339
386
 
340
- |type|description|
341
- |----|-----------|
342
- |`Array<a>`|The new array containing the elements from the input|
387
+ | type | description |
388
+ | ---------- | ---------------------------------------------------- |
389
+ | `Array<a>` | The new array containing the elements from the input |
343
390
 
344
391
  Examples:
345
392
 
@@ -355,18 +402,18 @@ No other changes yet.
355
402
  </details>
356
403
 
357
404
  ```grain
358
- cycle : (fn: (a => Void), n: Number, array: Array<a>) => Void
405
+ cycle: (fn: (a => Void), n: Number, array: Array<a>) => Void
359
406
  ```
360
407
 
361
408
  Iterates an array a given number of times, calling an iterator function on each element.
362
409
 
363
410
  Parameters:
364
411
 
365
- |param|type|description|
366
- |-----|----|-----------|
367
- |`fn`|`a => Void`|The iterator function to call with each element|
368
- |`n`|`Number`|The number of times to iterate the given array|
369
- |`array`|`Array<a>`|The array to iterate|
412
+ | param | type | description |
413
+ | ------- | ----------- | ----------------------------------------------- |
414
+ | `fn` | `a => Void` | The iterator function to call with each element |
415
+ | `n` | `Number` | The number of times to iterate the given array |
416
+ | `array` | `Array<a>` | The array to iterate |
370
417
 
371
418
  Examples:
372
419
 
@@ -391,17 +438,17 @@ assert str == "abcabc"
391
438
  </details>
392
439
 
393
440
  ```grain
394
- forEach : (fn: (a => Void), array: Array<a>) => Void
441
+ forEach: (fn: (a => Void), array: Array<a>) => Void
395
442
  ```
396
443
 
397
444
  Iterates an array, calling an iterator function on each element.
398
445
 
399
446
  Parameters:
400
447
 
401
- |param|type|description|
402
- |-----|----|-----------|
403
- |`fn`|`a => Void`|The iterator function to call with each element|
404
- |`array`|`Array<a>`|The array to iterate|
448
+ | param | type | description |
449
+ | ------- | ----------- | ----------------------------------------------- |
450
+ | `fn` | `a => Void` | The iterator function to call with each element |
451
+ | `array` | `Array<a>` | The array to iterate |
405
452
 
406
453
  Examples:
407
454
 
@@ -426,7 +473,7 @@ assert str == "abc"
426
473
  </details>
427
474
 
428
475
  ```grain
429
- forEachi : (fn: ((a, Number) => Void), array: Array<a>) => Void
476
+ forEachi: (fn: ((a, Number) => Void), array: Array<a>) => Void
430
477
  ```
431
478
 
432
479
  Iterates an array, calling an iterator function on each element.
@@ -434,10 +481,10 @@ Also passes the index as the second argument to the function.
434
481
 
435
482
  Parameters:
436
483
 
437
- |param|type|description|
438
- |-----|----|-----------|
439
- |`fn`|`(a, Number) => Void`|The iterator function to call with each element|
440
- |`array`|`Array<a>`|The array to iterate|
484
+ | param | type | description |
485
+ | ------- | --------------------- | ----------------------------------------------- |
486
+ | `fn` | `(a, Number) => Void` | The iterator function to call with each element |
487
+ | `array` | `Array<a>` | The array to iterate |
441
488
 
442
489
  Examples:
443
490
 
@@ -462,7 +509,7 @@ assert str == "a0b1c2"
462
509
  </details>
463
510
 
464
511
  ```grain
465
- map : (fn: (a => b), array: Array<a>) => Array<b>
512
+ map: (fn: (a => b), array: Array<a>) => Array<b>
466
513
  ```
467
514
 
468
515
  Produces a new array initialized with the results of a mapper function
@@ -470,16 +517,16 @@ called on each element of the input array.
470
517
 
471
518
  Parameters:
472
519
 
473
- |param|type|description|
474
- |-----|----|-----------|
475
- |`fn`|`a => b`|The mapper function to call on each element, where the value returned will be used to initialize the element in the new array|
476
- |`array`|`Array<a>`|The array to iterate|
520
+ | param | type | description |
521
+ | ------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------- |
522
+ | `fn` | `a => b` | The mapper function to call on each element, where the value returned will be used to initialize the element in the new array |
523
+ | `array` | `Array<a>` | The array to iterate |
477
524
 
478
525
  Returns:
479
526
 
480
- |type|description|
481
- |----|-----------|
482
- |`Array<b>`|The new array with mapped values|
527
+ | type | description |
528
+ | ---------- | -------------------------------- |
529
+ | `Array<b>` | The new array with mapped values |
483
530
 
484
531
  Examples:
485
532
 
@@ -495,7 +542,7 @@ No other changes yet.
495
542
  </details>
496
543
 
497
544
  ```grain
498
- mapi : (fn: ((a, Number) => b), array: Array<a>) => Array<b>
545
+ mapi: (fn: ((a, Number) => b), array: Array<a>) => Array<b>
499
546
  ```
500
547
 
501
548
  Produces a new array initialized with the results of a mapper function
@@ -503,16 +550,16 @@ called on each element of the input array and its index.
503
550
 
504
551
  Parameters:
505
552
 
506
- |param|type|description|
507
- |-----|----|-----------|
508
- |`fn`|`(a, Number) => b`|The mapper function to call on each element, where the value returned will be used to initialize the element in the new array|
509
- |`array`|`Array<a>`|The array to iterate|
553
+ | param | type | description |
554
+ | ------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
555
+ | `fn` | `(a, Number) => b` | The mapper function to call on each element, where the value returned will be used to initialize the element in the new array |
556
+ | `array` | `Array<a>` | The array to iterate |
510
557
 
511
558
  Returns:
512
559
 
513
- |type|description|
514
- |----|-----------|
515
- |`Array<b>`|The new array with mapped values|
560
+ | type | description |
561
+ | ---------- | -------------------------------- |
562
+ | `Array<b>` | The new array with mapped values |
516
563
 
517
564
  Examples:
518
565
 
@@ -528,7 +575,7 @@ No other changes yet.
528
575
  </details>
529
576
 
530
577
  ```grain
531
- reduce : (fn: ((a, b) => a), initial: a, array: Array<b>) => a
578
+ reduce: (fn: ((a, b) => a), initial: a, array: Array<b>) => a
532
579
  ```
533
580
 
534
581
  Combines all elements of an array using a reducer function,
@@ -541,17 +588,17 @@ returned. The accumulator starts with value `initial`.
541
588
 
542
589
  Parameters:
543
590
 
544
- |param|type|description|
545
- |-----|----|-----------|
546
- |`fn`|`(a, b) => a`|The reducer function to call on each element, where the value returned will be the next accumulator value|
547
- |`initial`|`a`|The initial value to use for the accumulator on the first iteration|
548
- |`array`|`Array<b>`|The array to iterate|
591
+ | param | type | description |
592
+ | --------- | ------------- | --------------------------------------------------------------------------------------------------------- |
593
+ | `fn` | `(a, b) => a` | The reducer function to call on each element, where the value returned will be the next accumulator value |
594
+ | `initial` | `a` | The initial value to use for the accumulator on the first iteration |
595
+ | `array` | `Array<b>` | The array to iterate |
549
596
 
550
597
  Returns:
551
598
 
552
- |type|description|
553
- |----|-----------|
554
- |`a`|The final accumulator returned from `fn`|
599
+ | type | description |
600
+ | ---- | ---------------------------------------- |
601
+ | `a` | The final accumulator returned from `fn` |
555
602
 
556
603
  Examples:
557
604
 
@@ -571,7 +618,7 @@ No other changes yet.
571
618
  </details>
572
619
 
573
620
  ```grain
574
- reduceRight : (fn: ((a, b) => b), initial: b, array: Array<a>) => b
621
+ reduceRight: (fn: ((a, b) => b), initial: b, array: Array<a>) => b
575
622
  ```
576
623
 
577
624
  Combines all elements of an array using a reducer function,
@@ -584,17 +631,17 @@ returned. The accumulator starts with value `initial`.
584
631
 
585
632
  Parameters:
586
633
 
587
- |param|type|description|
588
- |-----|----|-----------|
589
- |`fn`|`(a, b) => b`|The reducer function to call on each element, where the value returned will be the next accumulator value|
590
- |`initial`|`b`|The initial value to use for the accumulator on the first iteration|
591
- |`array`|`Array<a>`|The array to iterate|
634
+ | param | type | description |
635
+ | --------- | ------------- | --------------------------------------------------------------------------------------------------------- |
636
+ | `fn` | `(a, b) => b` | The reducer function to call on each element, where the value returned will be the next accumulator value |
637
+ | `initial` | `b` | The initial value to use for the accumulator on the first iteration |
638
+ | `array` | `Array<a>` | The array to iterate |
592
639
 
593
640
  Returns:
594
641
 
595
- |type|description|
596
- |----|-----------|
597
- |`b`|The final accumulator returned from `fn`|
642
+ | type | description |
643
+ | ---- | ---------------------------------------- |
644
+ | `b` | The final accumulator returned from `fn` |
598
645
 
599
646
  Examples:
600
647
 
@@ -610,7 +657,7 @@ No other changes yet.
610
657
  </details>
611
658
 
612
659
  ```grain
613
- reducei : (fn: ((a, b, Number) => a), initial: a, array: Array<b>) => a
660
+ reducei: (fn: ((a, b, Number) => a), initial: a, array: Array<b>) => a
614
661
  ```
615
662
 
616
663
  Combines all elements of an array using a reducer function,
@@ -624,17 +671,17 @@ starts with value `initial`.
624
671
 
625
672
  Parameters:
626
673
 
627
- |param|type|description|
628
- |-----|----|-----------|
629
- |`fn`|`(a, b, Number) => a`|The reducer function to call on each element, where the value returned will be the next accumulator value|
630
- |`initial`|`a`|The initial value to use for the accumulator on the first iteration|
631
- |`array`|`Array<b>`|The array to iterate|
674
+ | param | type | description |
675
+ | --------- | --------------------- | --------------------------------------------------------------------------------------------------------- |
676
+ | `fn` | `(a, b, Number) => a` | The reducer function to call on each element, where the value returned will be the next accumulator value |
677
+ | `initial` | `a` | The initial value to use for the accumulator on the first iteration |
678
+ | `array` | `Array<b>` | The array to iterate |
632
679
 
633
680
  Returns:
634
681
 
635
- |type|description|
636
- |----|-----------|
637
- |`a`|The final accumulator returned from `fn`|
682
+ | type | description |
683
+ | ---- | ---------------------------------------- |
684
+ | `a` | The final accumulator returned from `fn` |
638
685
 
639
686
  Examples:
640
687
 
@@ -657,7 +704,7 @@ No other changes yet.
657
704
  </details>
658
705
 
659
706
  ```grain
660
- flatMap : (fn: (b => Array<a>), array: Array<b>) => Array<a>
707
+ flatMap: (fn: (b => Array<a>), array: Array<b>) => Array<a>
661
708
  ```
662
709
 
663
710
  Produces a new array by calling a function on each element
@@ -667,16 +714,16 @@ of all results.
667
714
 
668
715
  Parameters:
669
716
 
670
- |param|type|description|
671
- |-----|----|-----------|
672
- |`fn`|`b => Array<a>`|The function to be called on each element, where the value returned will be an array that gets appended to the new array|
673
- |`array`|`Array<b>`|The array to iterate|
717
+ | param | type | description |
718
+ | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------ |
719
+ | `fn` | `b => Array<a>` | The function to be called on each element, where the value returned will be an array that gets appended to the new array |
720
+ | `array` | `Array<b>` | The array to iterate |
674
721
 
675
722
  Returns:
676
723
 
677
- |type|description|
678
- |----|-----------|
679
- |`Array<a>`|The new array|
724
+ | type | description |
725
+ | ---------- | ------------- |
726
+ | `Array<a>` | The new array |
680
727
 
681
728
  Throws:
682
729
 
@@ -698,7 +745,7 @@ No other changes yet.
698
745
  </details>
699
746
 
700
747
  ```grain
701
- every : (fn: (a => Bool), array: Array<a>) => Bool
748
+ every: (fn: (a => Bool), array: Array<a>) => Bool
702
749
  ```
703
750
 
704
751
  Checks that the given condition is satisfied for all
@@ -706,16 +753,16 @@ elements in the input array.
706
753
 
707
754
  Parameters:
708
755
 
709
- |param|type|description|
710
- |-----|----|-----------|
711
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
712
- |`array`|`Array<a>`|The array to check|
756
+ | param | type | description |
757
+ | ------- | ----------- | --------------------------------------------------------------------------------------------------------------- |
758
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
759
+ | `array` | `Array<a>` | The array to check |
713
760
 
714
761
  Returns:
715
762
 
716
- |type|description|
717
- |----|-----------|
718
- |`Bool`|`true` if all elements satisfy the condition or `false` otherwise|
763
+ | type | description |
764
+ | ------ | ----------------------------------------------------------------- |
765
+ | `Bool` | `true` if all elements satisfy the condition or `false` otherwise |
719
766
 
720
767
  Examples:
721
768
 
@@ -735,7 +782,7 @@ No other changes yet.
735
782
  </details>
736
783
 
737
784
  ```grain
738
- some : (fn: (a => Bool), array: Array<a>) => Bool
785
+ some: (fn: (a => Bool), array: Array<a>) => Bool
739
786
  ```
740
787
 
741
788
  Checks that the given condition is satisfied **at least
@@ -743,16 +790,16 @@ once** by an element in the input array.
743
790
 
744
791
  Parameters:
745
792
 
746
- |param|type|description|
747
- |-----|----|-----------|
748
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
749
- |`array`|`Array<a>`|The array to iterate|
793
+ | param | type | description |
794
+ | ------- | ----------- | --------------------------------------------------------------------------------------------------------------- |
795
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
796
+ | `array` | `Array<a>` | The array to iterate |
750
797
 
751
798
  Returns:
752
799
 
753
- |type|description|
754
- |----|-----------|
755
- |`Bool`|`true` if one or more elements satisfy the condition or `false` otherwise|
800
+ | type | description |
801
+ | ------ | ------------------------------------------------------------------------- |
802
+ | `Bool` | `true` if one or more elements satisfy the condition or `false` otherwise |
756
803
 
757
804
  Examples:
758
805
 
@@ -776,17 +823,17 @@ No other changes yet.
776
823
  </details>
777
824
 
778
825
  ```grain
779
- fill : (value: a, array: Array<a>) => Void
826
+ fill: (value: a, array: Array<a>) => Void
780
827
  ```
781
828
 
782
829
  Replaces all elements in an array with the new value provided.
783
830
 
784
831
  Parameters:
785
832
 
786
- |param|type|description|
787
- |-----|----|-----------|
788
- |`value`|`a`|The value replacing each element|
789
- |`array`|`Array<a>`|The array to update|
833
+ | param | type | description |
834
+ | ------- | ---------- | -------------------------------- |
835
+ | `value` | `a` | The value replacing each element |
836
+ | `array` | `Array<a>` | The array to update |
790
837
 
791
838
  Examples:
792
839
 
@@ -804,7 +851,7 @@ No other changes yet.
804
851
  </details>
805
852
 
806
853
  ```grain
807
- fillRange : (value: a, start: Number, stop: Number, array: Array<a>) => Void
854
+ fillRange: (value: a, start: Number, stop: Number, array: Array<a>) => Void
808
855
  ```
809
856
 
810
857
  Replaces all elements in the provided index range in the array
@@ -812,12 +859,12 @@ with the new value provided. Fails if the index is out-of-bounds.
812
859
 
813
860
  Parameters:
814
861
 
815
- |param|type|description|
816
- |-----|----|-----------|
817
- |`value`|`a`|The value replacing each element between the indexes|
818
- |`start`|`Number`|The index to begin replacement|
819
- |`stop`|`Number`|The (exclusive) index to end replacement|
820
- |`array`|`Array<a>`|The array to update|
862
+ | param | type | description |
863
+ | ------- | ---------- | ---------------------------------------------------- |
864
+ | `value` | `a` | The value replacing each element between the indexes |
865
+ | `start` | `Number` | The index to begin replacement |
866
+ | `stop` | `Number` | The (exclusive) index to end replacement |
867
+ | `array` | `Array<a>` | The array to update |
821
868
 
822
869
  Throws:
823
870
 
@@ -842,22 +889,22 @@ No other changes yet.
842
889
  </details>
843
890
 
844
891
  ```grain
845
- reverse : (array: Array<a>) => Array<a>
892
+ reverse: (array: Array<a>) => Array<a>
846
893
  ```
847
894
 
848
895
  Creates a new array with all elements in reverse order.
849
896
 
850
897
  Parameters:
851
898
 
852
- |param|type|description|
853
- |-----|----|-----------|
854
- |`array`|`Array<a>`|The array to reverse|
899
+ | param | type | description |
900
+ | ------- | ---------- | -------------------- |
901
+ | `array` | `Array<a>` | The array to reverse |
855
902
 
856
903
  Returns:
857
904
 
858
- |type|description|
859
- |----|-----------|
860
- |`Array<a>`|The new array|
905
+ | type | description |
906
+ | ---------- | ------------- |
907
+ | `Array<a>` | The new array |
861
908
 
862
909
  Examples:
863
910
 
@@ -873,22 +920,22 @@ No other changes yet.
873
920
  </details>
874
921
 
875
922
  ```grain
876
- toList : (array: Array<a>) => List<a>
923
+ toList: (array: Array<a>) => List<a>
877
924
  ```
878
925
 
879
926
  Converts the input array to a list.
880
927
 
881
928
  Parameters:
882
929
 
883
- |param|type|description|
884
- |-----|----|-----------|
885
- |`array`|`Array<a>`|The array to convert|
930
+ | param | type | description |
931
+ | ------- | ---------- | -------------------- |
932
+ | `array` | `Array<a>` | The array to convert |
886
933
 
887
934
  Returns:
888
935
 
889
- |type|description|
890
- |----|-----------|
891
- |`List<a>`|The list containing all elements from the array|
936
+ | type | description |
937
+ | --------- | ----------------------------------------------- |
938
+ | `List<a>` | The list containing all elements from the array |
892
939
 
893
940
  Examples:
894
941
 
@@ -904,22 +951,22 @@ No other changes yet.
904
951
  </details>
905
952
 
906
953
  ```grain
907
- fromList : (list: List<a>) => Array<a>
954
+ fromList: (list: List<a>) => Array<a>
908
955
  ```
909
956
 
910
957
  Converts the input list to an array.
911
958
 
912
959
  Parameters:
913
960
 
914
- |param|type|description|
915
- |-----|----|-----------|
916
- |`list`|`List<a>`|The list to convert|
961
+ | param | type | description |
962
+ | ------ | --------- | ------------------- |
963
+ | `list` | `List<a>` | The list to convert |
917
964
 
918
965
  Returns:
919
966
 
920
- |type|description|
921
- |----|-----------|
922
- |`Array<a>`|The array containing all elements from the list|
967
+ | type | description |
968
+ | ---------- | ----------------------------------------------- |
969
+ | `Array<a>` | The array containing all elements from the list |
923
970
 
924
971
  Examples:
925
972
 
@@ -935,7 +982,7 @@ No other changes yet.
935
982
  </details>
936
983
 
937
984
  ```grain
938
- contains : (search: a, array: Array<a>) => Bool
985
+ contains: (search: a, array: Array<a>) => Bool
939
986
  ```
940
987
 
941
988
  Checks if the value is an element of the input array.
@@ -943,16 +990,16 @@ Uses the generic `==` structural equality operator.
943
990
 
944
991
  Parameters:
945
992
 
946
- |param|type|description|
947
- |-----|----|-----------|
948
- |`search`|`a`|The value to compare|
949
- |`array`|`Array<a>`|The array to inspect|
993
+ | param | type | description |
994
+ | -------- | ---------- | -------------------- |
995
+ | `search` | `a` | The value to compare |
996
+ | `array` | `Array<a>` | The array to inspect |
950
997
 
951
998
  Returns:
952
999
 
953
- |type|description|
954
- |----|-----------|
955
- |`Bool`|`true` if the value exists in the array or `false` otherwise|
1000
+ | type | description |
1001
+ | ------ | ------------------------------------------------------------ |
1002
+ | `Bool` | `true` if the value exists in the array or `false` otherwise |
956
1003
 
957
1004
  Examples:
958
1005
 
@@ -972,23 +1019,23 @@ No other changes yet.
972
1019
  </details>
973
1020
 
974
1021
  ```grain
975
- find : (fn: (a => Bool), array: Array<a>) => Option<a>
1022
+ find: (fn: (a => Bool), array: Array<a>) => Option<a>
976
1023
  ```
977
1024
 
978
1025
  Finds the first element in an array that satisfies the given condition.
979
1026
 
980
1027
  Parameters:
981
1028
 
982
- |param|type|description|
983
- |-----|----|-----------|
984
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
985
- |`array`|`Array<a>`|The array to search|
1029
+ | param | type | description |
1030
+ | ------- | ----------- | --------------------------------------------------------------------------------------------------------------- |
1031
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
1032
+ | `array` | `Array<a>` | The array to search |
986
1033
 
987
1034
  Returns:
988
1035
 
989
- |type|description|
990
- |----|-----------|
991
- |`Option<a>`|`Some(element)` containing the first value found or `None` otherwise|
1036
+ | type | description |
1037
+ | ----------- | -------------------------------------------------------------------- |
1038
+ | `Option<a>` | `Some(element)` containing the first value found or `None` otherwise |
992
1039
 
993
1040
  Examples:
994
1041
 
@@ -1012,23 +1059,23 @@ No other changes yet.
1012
1059
  </details>
1013
1060
 
1014
1061
  ```grain
1015
- findIndex : (fn: (a => Bool), array: Array<a>) => Option<Number>
1062
+ findIndex: (fn: (a => Bool), array: Array<a>) => Option<Number>
1016
1063
  ```
1017
1064
 
1018
1065
  Finds the first index in an array where the element satisfies the given condition.
1019
1066
 
1020
1067
  Parameters:
1021
1068
 
1022
- |param|type|description|
1023
- |-----|----|-----------|
1024
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
1025
- |`array`|`Array<a>`|The array to search|
1069
+ | param | type | description |
1070
+ | ------- | ----------- | --------------------------------------------------------------------------------------------------------------- |
1071
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
1072
+ | `array` | `Array<a>` | The array to search |
1026
1073
 
1027
1074
  Returns:
1028
1075
 
1029
- |type|description|
1030
- |----|-----------|
1031
- |`Option<Number>`|`Some(index)` containing the index of the first element found or `None` otherwise|
1076
+ | type | description |
1077
+ | ---------------- | --------------------------------------------------------------------------------- |
1078
+ | `Option<Number>` | `Some(index)` containing the index of the first element found or `None` otherwise |
1032
1079
 
1033
1080
  Examples:
1034
1081
 
@@ -1052,7 +1099,7 @@ No other changes yet.
1052
1099
  </details>
1053
1100
 
1054
1101
  ```grain
1055
- product : (array1: Array<a>, array2: Array<b>) => Array<(a, b)>
1102
+ product: (array1: Array<a>, array2: Array<b>) => Array<(a, b)>
1056
1103
  ```
1057
1104
 
1058
1105
  Combines two arrays into a Cartesian product of tuples containing
@@ -1060,16 +1107,16 @@ all ordered pairs `(a, b)`.
1060
1107
 
1061
1108
  Parameters:
1062
1109
 
1063
- |param|type|description|
1064
- |-----|----|-----------|
1065
- |`array1`|`Array<a>`|The array to provide values for the first tuple element|
1066
- |`array2`|`Array<b>`|The array to provide values for the second tuple element|
1110
+ | param | type | description |
1111
+ | -------- | ---------- | -------------------------------------------------------- |
1112
+ | `array1` | `Array<a>` | The array to provide values for the first tuple element |
1113
+ | `array2` | `Array<b>` | The array to provide values for the second tuple element |
1067
1114
 
1068
1115
  Returns:
1069
1116
 
1070
- |type|description|
1071
- |----|-----------|
1072
- |`Array<(a, b)>`|The new array containing all pairs of `(a, b)`|
1117
+ | type | description |
1118
+ | --------------- | ---------------------------------------------- |
1119
+ | `Array<(a, b)>` | The new array containing all pairs of `(a, b)` |
1073
1120
 
1074
1121
  Throws:
1075
1122
 
@@ -1091,23 +1138,23 @@ No other changes yet.
1091
1138
  </details>
1092
1139
 
1093
1140
  ```grain
1094
- count : (fn: (a => Bool), array: Array<a>) => Number
1141
+ count: (fn: (a => Bool), array: Array<a>) => Number
1095
1142
  ```
1096
1143
 
1097
1144
  Counts the number of elements in an array that satisfy the given condition.
1098
1145
 
1099
1146
  Parameters:
1100
1147
 
1101
- |param|type|description|
1102
- |-----|----|-----------|
1103
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
1104
- |`array`|`Array<a>`|The array to iterate|
1148
+ | param | type | description |
1149
+ | ------- | ----------- | --------------------------------------------------------------------------------------------------------------- |
1150
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
1151
+ | `array` | `Array<a>` | The array to iterate |
1105
1152
 
1106
1153
  Returns:
1107
1154
 
1108
- |type|description|
1109
- |----|-----------|
1110
- |`Number`|The total number of elements that satisfy the condition|
1155
+ | type | description |
1156
+ | -------- | ------------------------------------------------------- |
1157
+ | `Number` | The total number of elements that satisfy the condition |
1111
1158
 
1112
1159
  Examples:
1113
1160
 
@@ -1123,7 +1170,7 @@ No other changes yet.
1123
1170
  </details>
1124
1171
 
1125
1172
  ```grain
1126
- counti : (fn: ((a, Number) => Bool), array: Array<a>) => Number
1173
+ counti: (fn: ((a, Number) => Bool), array: Array<a>) => Number
1127
1174
  ```
1128
1175
 
1129
1176
  Counts the number of elements in an array that satisfy the
@@ -1131,16 +1178,16 @@ given condition. Also passes the index to the function.
1131
1178
 
1132
1179
  Parameters:
1133
1180
 
1134
- |param|type|description|
1135
- |-----|----|-----------|
1136
- |`fn`|`(a, Number) => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
1137
- |`array`|`Array<a>`|The array to iterate|
1181
+ | param | type | description |
1182
+ | ------- | --------------------- | --------------------------------------------------------------------------------------------------------------- |
1183
+ | `fn` | `(a, Number) => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
1184
+ | `array` | `Array<a>` | The array to iterate |
1138
1185
 
1139
1186
  Returns:
1140
1187
 
1141
- |type|description|
1142
- |----|-----------|
1143
- |`Number`|The total number of elements that satisfy the condition|
1188
+ | type | description |
1189
+ | -------- | ------------------------------------------------------- |
1190
+ | `Number` | The total number of elements that satisfy the condition |
1144
1191
 
1145
1192
  Examples:
1146
1193
 
@@ -1160,7 +1207,7 @@ No other changes yet.
1160
1207
  </details>
1161
1208
 
1162
1209
  ```grain
1163
- filter : (fn: (a => Bool), array: Array<a>) => Array<a>
1210
+ filter: (fn: (a => Bool), array: Array<a>) => Array<a>
1164
1211
  ```
1165
1212
 
1166
1213
  Produces a new array by calling a function on each element of
@@ -1169,16 +1216,16 @@ the condition.
1169
1216
 
1170
1217
  Parameters:
1171
1218
 
1172
- |param|type|description|
1173
- |-----|----|-----------|
1174
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
1175
- |`array`|`Array<a>`|The array to iterate|
1219
+ | param | type | description |
1220
+ | ------- | ----------- | --------------------------------------------------------------------------------------------------------------- |
1221
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
1222
+ | `array` | `Array<a>` | The array to iterate |
1176
1223
 
1177
1224
  Returns:
1178
1225
 
1179
- |type|description|
1180
- |----|-----------|
1181
- |`Array<a>`|The new array containing elements where `fn` returned `true`|
1226
+ | type | description |
1227
+ | ---------- | ------------------------------------------------------------ |
1228
+ | `Array<a>` | The new array containing elements where `fn` returned `true` |
1182
1229
 
1183
1230
  Examples:
1184
1231
 
@@ -1194,7 +1241,7 @@ No other changes yet.
1194
1241
  </details>
1195
1242
 
1196
1243
  ```grain
1197
- filteri : (fn: ((a, Number) => Bool), array: Array<a>) => Array<a>
1244
+ filteri: (fn: ((a, Number) => Bool), array: Array<a>) => Array<a>
1198
1245
  ```
1199
1246
 
1200
1247
  Produces a new array by calling a function on each element of
@@ -1203,16 +1250,16 @@ the condition. Also passes the index to the function.
1203
1250
 
1204
1251
  Parameters:
1205
1252
 
1206
- |param|type|description|
1207
- |-----|----|-----------|
1208
- |`fn`|`(a, Number) => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
1209
- |`array`|`Array<a>`|The array to iterate|
1253
+ | param | type | description |
1254
+ | ------- | --------------------- | --------------------------------------------------------------------------------------------------------------- |
1255
+ | `fn` | `(a, Number) => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
1256
+ | `array` | `Array<a>` | The array to iterate |
1210
1257
 
1211
1258
  Returns:
1212
1259
 
1213
- |type|description|
1214
- |----|-----------|
1215
- |`Array<a>`|The new array containing elements where `fn` returned `true`|
1260
+ | type | description |
1261
+ | ---------- | ------------------------------------------------------------ |
1262
+ | `Array<a>` | The new array containing elements where `fn` returned `true` |
1216
1263
 
1217
1264
  Examples:
1218
1265
 
@@ -1232,7 +1279,7 @@ No other changes yet.
1232
1279
  </details>
1233
1280
 
1234
1281
  ```grain
1235
- unique : (array: Array<a>) => Array<a>
1282
+ unique: (array: Array<a>) => Array<a>
1236
1283
  ```
1237
1284
 
1238
1285
  Produces a new array with any duplicates removed.
@@ -1240,15 +1287,15 @@ Uses the generic `==` structural equality operator.
1240
1287
 
1241
1288
  Parameters:
1242
1289
 
1243
- |param|type|description|
1244
- |-----|----|-----------|
1245
- |`array`|`Array<a>`|The array to filter|
1290
+ | param | type | description |
1291
+ | ------- | ---------- | ------------------- |
1292
+ | `array` | `Array<a>` | The array to filter |
1246
1293
 
1247
1294
  Returns:
1248
1295
 
1249
- |type|description|
1250
- |----|-----------|
1251
- |`Array<a>`|The new array with only unique values|
1296
+ | type | description |
1297
+ | ---------- | ------------------------------------- |
1298
+ | `Array<a>` | The new array with only unique values |
1252
1299
 
1253
1300
  Examples:
1254
1301
 
@@ -1271,7 +1318,7 @@ Array.unique([> 1, 2, 1, 2, 3, 1]) == [> 1, 2, 3]
1271
1318
  </details>
1272
1319
 
1273
1320
  ```grain
1274
- zip : (array1: Array<a>, array2: Array<b>) => Array<(a, b)>
1321
+ zip: (array1: Array<a>, array2: Array<b>) => Array<(a, b)>
1275
1322
  ```
1276
1323
 
1277
1324
  Produces a new array filled with tuples of elements from both given arrays.
@@ -1280,16 +1327,16 @@ will contain the second item of each array, and so on.
1280
1327
 
1281
1328
  Parameters:
1282
1329
 
1283
- |param|type|description|
1284
- |-----|----|-----------|
1285
- |`array1`|`Array<a>`|The array to provide values for the first tuple element|
1286
- |`array2`|`Array<b>`|The array to provide values for the second tuple element|
1330
+ | param | type | description |
1331
+ | -------- | ---------- | -------------------------------------------------------- |
1332
+ | `array1` | `Array<a>` | The array to provide values for the first tuple element |
1333
+ | `array2` | `Array<b>` | The array to provide values for the second tuple element |
1287
1334
 
1288
1335
  Returns:
1289
1336
 
1290
- |type|description|
1291
- |----|-----------|
1292
- |`Array<(a, b)>`|The new array containing indexed pairs of `(a, b)`|
1337
+ | type | description |
1338
+ | --------------- | -------------------------------------------------- |
1339
+ | `Array<(a, b)>` | The new array containing indexed pairs of `(a, b)` |
1293
1340
 
1294
1341
  Throws:
1295
1342
 
@@ -1311,7 +1358,7 @@ No other changes yet.
1311
1358
  </details>
1312
1359
 
1313
1360
  ```grain
1314
- zipWith : (fn: ((a, b) => c), array1: Array<a>, array2: Array<b>) => Array<c>
1361
+ zipWith: (fn: ((a, b) => c), array1: Array<a>, array2: Array<b>) => Array<c>
1315
1362
  ```
1316
1363
 
1317
1364
  Produces a new array filled with elements defined by applying a function on
@@ -1325,17 +1372,17 @@ array to have the length of the smaller array.
1325
1372
 
1326
1373
  Parameters:
1327
1374
 
1328
- |param|type|description|
1329
- |-----|----|-----------|
1330
- |`fn`|`(a, b) => c`|The function to apply to pairs of elements|
1331
- |`array1`|`Array<a>`|The array whose elements will each be passed to the function as the first argument|
1332
- |`array2`|`Array<b>`|The array whose elements will each be passed to the function as the second argument|
1375
+ | param | type | description |
1376
+ | -------- | ------------- | ----------------------------------------------------------------------------------- |
1377
+ | `fn` | `(a, b) => c` | The function to apply to pairs of elements |
1378
+ | `array1` | `Array<a>` | The array whose elements will each be passed to the function as the first argument |
1379
+ | `array2` | `Array<b>` | The array whose elements will each be passed to the function as the second argument |
1333
1380
 
1334
1381
  Returns:
1335
1382
 
1336
- |type|description|
1337
- |----|-----------|
1338
- |`Array<c>`|The new array containing elements derived from applying the function to pairs of input array elements|
1383
+ | type | description |
1384
+ | ---------- | ----------------------------------------------------------------------------------------------------- |
1385
+ | `Array<c>` | The new array containing elements derived from applying the function to pairs of input array elements |
1339
1386
 
1340
1387
  Throws:
1341
1388
 
@@ -1361,22 +1408,22 @@ No other changes yet.
1361
1408
  </details>
1362
1409
 
1363
1410
  ```grain
1364
- unzip : (array: Array<(a, b)>) => (Array<a>, Array<b>)
1411
+ unzip: (array: Array<(a, b)>) => (Array<a>, Array<b>)
1365
1412
  ```
1366
1413
 
1367
1414
  Produces two arrays by splitting apart an array of tuples.
1368
1415
 
1369
1416
  Parameters:
1370
1417
 
1371
- |param|type|description|
1372
- |-----|----|-----------|
1373
- |`array`|`Array<(a, b)>`|The array of tuples to split|
1418
+ | param | type | description |
1419
+ | ------- | --------------- | ---------------------------- |
1420
+ | `array` | `Array<(a, b)>` | The array of tuples to split |
1374
1421
 
1375
1422
  Returns:
1376
1423
 
1377
- |type|description|
1378
- |----|-----------|
1379
- |`(Array<a>, Array<b>)`|An array containing all elements from the first tuple element, and an array containing all elements from the second tuple element|
1424
+ | type | description |
1425
+ | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
1426
+ | `(Array<a>, Array<b>)` | An array containing all elements from the first tuple element, and an array containing all elements from the second tuple element |
1380
1427
 
1381
1428
  Examples:
1382
1429
 
@@ -1392,23 +1439,23 @@ No other changes yet.
1392
1439
  </details>
1393
1440
 
1394
1441
  ```grain
1395
- join : (separator: String, items: Array<String>) => String
1442
+ join: (separator: String, items: Array<String>) => String
1396
1443
  ```
1397
1444
 
1398
1445
  Concatenates an array of strings into a single string, separated by a separator string.
1399
1446
 
1400
1447
  Parameters:
1401
1448
 
1402
- |param|type|description|
1403
- |-----|----|-----------|
1404
- |`separator`|`String`|The separator to insert between items in the string|
1405
- |`items`|`Array<String>`|The input strings|
1449
+ | param | type | description |
1450
+ | ----------- | --------------- | --------------------------------------------------- |
1451
+ | `separator` | `String` | The separator to insert between items in the string |
1452
+ | `items` | `Array<String>` | The input strings |
1406
1453
 
1407
1454
  Returns:
1408
1455
 
1409
- |type|description|
1410
- |----|-----------|
1411
- |`String`|The concatenated string|
1456
+ | type | description |
1457
+ | -------- | ----------------------- |
1458
+ | `String` | The concatenated string |
1412
1459
 
1413
1460
  Examples:
1414
1461
 
@@ -1431,7 +1478,7 @@ Array.join(", ", [> "a", "b", "c"]) == "a, b, c"
1431
1478
  </details>
1432
1479
 
1433
1480
  ```grain
1434
- slice : (start: Number, ?end: Number, array: Array<a>) => Array<a>
1481
+ slice: (start: Number, ?end: Number, array: Array<a>) => Array<a>
1435
1482
  ```
1436
1483
 
1437
1484
  Slices an array given zero-based start and end indexes. The value
@@ -1442,17 +1489,17 @@ the end of the array. e.g. `slice(1, -1, [> 'a', 'b', 'c']) == [> 'b']`.
1442
1489
 
1443
1490
  Parameters:
1444
1491
 
1445
- |param|type|description|
1446
- |-----|----|-----------|
1447
- |`start`|`Number`|The index of the array where the slice will begin (inclusive)|
1448
- |`?end`|`Number`|The index of the array where the slice will end (exclusive)|
1449
- |`array`|`Array<a>`|The array to be sliced|
1492
+ | param | type | description |
1493
+ | ------- | ---------- | ------------------------------------------------------------- |
1494
+ | `start` | `Number` | The index of the array where the slice will begin (inclusive) |
1495
+ | `?end` | `Number` | The index of the array where the slice will end (exclusive) |
1496
+ | `array` | `Array<a>` | The array to be sliced |
1450
1497
 
1451
1498
  Returns:
1452
1499
 
1453
- |type|description|
1454
- |----|-----------|
1455
- |`Array<a>`|The subset of the array that was sliced|
1500
+ | type | description |
1501
+ | ---------- | --------------------------------------- |
1502
+ | `Array<a>` | The subset of the array that was sliced |
1456
1503
 
1457
1504
  Examples:
1458
1505
 
@@ -1479,7 +1526,7 @@ Array.slice(1, [> 1, 2, 3, 4]) == [> 2, 3, 4]
1479
1526
  </details>
1480
1527
 
1481
1528
  ```grain
1482
- sort : (?compare: ((num1: a, num2: a) => Number), array: Array<a>) => Void
1529
+ sort: (?compare: ((num1: a, num2: a) => Number), array: Array<a>) => Void
1483
1530
  ```
1484
1531
 
1485
1532
  Sorts an array in-place.
@@ -1488,10 +1535,10 @@ Ordering is calculated using a comparator function which takes two array element
1488
1535
 
1489
1536
  Parameters:
1490
1537
 
1491
- |param|type|description|
1492
- |-----|----|-----------|
1493
- |`?compare`|`(num1: a, num2: a) => Number`|The comparator function used to indicate sort order|
1494
- |`array`|`Array<a>`|The array to be sorted|
1538
+ | param | type | description |
1539
+ | ---------- | ------------------------------ | --------------------------------------------------- |
1540
+ | `?compare` | `(num1: a, num2: a) => Number` | The comparator function used to indicate sort order |
1541
+ | `array` | `Array<a>` | The array to be sorted |
1495
1542
 
1496
1543
  Examples:
1497
1544
 
@@ -1516,7 +1563,7 @@ assert arr == [> 1, 2, 3, 4]
1516
1563
  </details>
1517
1564
 
1518
1565
  ```grain
1519
- rotate : (n: Number, arr: Array<a>) => Void
1566
+ rotate: (n: Number, arr: Array<a>) => Void
1520
1567
  ```
1521
1568
 
1522
1569
  Rotates array elements in place by the specified amount to the left, such
@@ -1527,10 +1574,10 @@ specified amount to the right. See examples.
1527
1574
 
1528
1575
  Parameters:
1529
1576
 
1530
- |param|type|description|
1531
- |-----|----|-----------|
1532
- |`n`|`Number`|The number of elements to rotate by|
1533
- |`arr`|`Array<a>`|The array to be rotated|
1577
+ | param | type | description |
1578
+ | ----- | ---------- | ----------------------------------- |
1579
+ | `n` | `Number` | The number of elements to rotate by |
1580
+ | `arr` | `Array<a>` | The array to be rotated |
1534
1581
 
1535
1582
  Examples:
1536
1583
 
@@ -1554,7 +1601,7 @@ No other changes yet.
1554
1601
  </details>
1555
1602
 
1556
1603
  ```grain
1557
- chunk : (chunkSize: Number, arr: Array<a>) => Array<Array<a>>
1604
+ chunk: (chunkSize: Number, arr: Array<a>) => Array<Array<a>>
1558
1605
  ```
1559
1606
 
1560
1607
  Splits the given array into chunks of the provided size.
@@ -1562,16 +1609,16 @@ If the array cannot be split evenly, the final chunk will contain the remaining
1562
1609
 
1563
1610
  Parameters:
1564
1611
 
1565
- |param|type|description|
1566
- |-----|----|-----------|
1567
- |`chunkSize`|`Number`|The maximum size of each chunk|
1568
- |`arr`|`Array<a>`|The array to chunk|
1612
+ | param | type | description |
1613
+ | ----------- | ---------- | ------------------------------ |
1614
+ | `chunkSize` | `Number` | The maximum size of each chunk |
1615
+ | `arr` | `Array<a>` | The array to chunk |
1569
1616
 
1570
1617
  Returns:
1571
1618
 
1572
- |type|description|
1573
- |----|-----------|
1574
- |`Array<Array<a>>`|An array of chunks|
1619
+ | type | description |
1620
+ | ----------------- | ------------------ |
1621
+ | `Array<Array<a>>` | An array of chunks |
1575
1622
 
1576
1623
  Throws:
1577
1624
 
@@ -1647,7 +1694,7 @@ Functions and constants included in the Array.Immutable module.
1647
1694
  </details>
1648
1695
 
1649
1696
  ```grain
1650
- empty : ImmutableArray<a>
1697
+ empty: ImmutableArray<a>
1651
1698
  ```
1652
1699
 
1653
1700
  An empty array.
@@ -1673,22 +1720,22 @@ Array.Immutable.empty == Array.Immutable.fromList([])
1673
1720
  </details>
1674
1721
 
1675
1722
  ```grain
1676
- isEmpty : (array: ImmutableArray<a>) => Bool
1723
+ isEmpty: (array: ImmutableArray<a>) => Bool
1677
1724
  ```
1678
1725
 
1679
1726
  Determines if the array contains no elements.
1680
1727
 
1681
1728
  Parameters:
1682
1729
 
1683
- |param|type|description|
1684
- |-----|----|-----------|
1685
- |`array`|`ImmutableArray<a>`|The array to check|
1730
+ | param | type | description |
1731
+ | ------- | ------------------- | ------------------ |
1732
+ | `array` | `ImmutableArray<a>` | The array to check |
1686
1733
 
1687
1734
  Returns:
1688
1735
 
1689
- |type|description|
1690
- |----|-----------|
1691
- |`Bool`|`true` if the array is empty and `false` otherwise|
1736
+ | type | description |
1737
+ | ------ | -------------------------------------------------- |
1738
+ | `Bool` | `true` if the array is empty and `false` otherwise |
1692
1739
 
1693
1740
  Examples:
1694
1741
 
@@ -1717,22 +1764,22 @@ assert Immutable.isEmpty(Immutable.fromList([])) == true
1717
1764
  </details>
1718
1765
 
1719
1766
  ```grain
1720
- length : (array: ImmutableArray<a>) => Number
1767
+ length: (array: ImmutableArray<a>) => Number
1721
1768
  ```
1722
1769
 
1723
1770
  Provides the length of the input array.
1724
1771
 
1725
1772
  Parameters:
1726
1773
 
1727
- |param|type|description|
1728
- |-----|----|-----------|
1729
- |`array`|`ImmutableArray<a>`|The array to inspect|
1774
+ | param | type | description |
1775
+ | ------- | ------------------- | -------------------- |
1776
+ | `array` | `ImmutableArray<a>` | The array to inspect |
1730
1777
 
1731
1778
  Returns:
1732
1779
 
1733
- |type|description|
1734
- |----|-----------|
1735
- |`Number`|The number of elements in the array|
1780
+ | type | description |
1781
+ | -------- | ----------------------------------- |
1782
+ | `Number` | The number of elements in the array |
1736
1783
 
1737
1784
  Examples:
1738
1785
 
@@ -1756,7 +1803,7 @@ assert Immutable.length(Immutable.fromList([1, 2, 3, 4, 5])) == 5
1756
1803
  </details>
1757
1804
 
1758
1805
  ```grain
1759
- get : (index: Number, array: ImmutableArray<a>) => a
1806
+ get: (index: Number, array: ImmutableArray<a>) => a
1760
1807
  ```
1761
1808
 
1762
1809
  Retrieves the element from the array at the specified index.
@@ -1764,16 +1811,16 @@ A negative index is treated as an offset from the end of the array.
1764
1811
 
1765
1812
  Parameters:
1766
1813
 
1767
- |param|type|description|
1768
- |-----|----|-----------|
1769
- |`index`|`Number`|The index to access|
1770
- |`array`|`ImmutableArray<a>`|The array to access|
1814
+ | param | type | description |
1815
+ | ------- | ------------------- | ------------------- |
1816
+ | `index` | `Number` | The index to access |
1817
+ | `array` | `ImmutableArray<a>` | The array to access |
1771
1818
 
1772
1819
  Returns:
1773
1820
 
1774
- |type|description|
1775
- |----|-----------|
1776
- |`a`|The element from the array|
1821
+ | type | description |
1822
+ | ---- | -------------------------- |
1823
+ | `a` | The element from the array |
1777
1824
 
1778
1825
  Throws:
1779
1826
 
@@ -1808,8 +1855,7 @@ assert Immutable.get(-1, Immutable.fromList([1, 2, 3, 4])) == 4
1808
1855
  </details>
1809
1856
 
1810
1857
  ```grain
1811
- set :
1812
- (index: Number, value: a, array: ImmutableArray<a>) => ImmutableArray<a>
1858
+ set: (index: Number, value: a, array: ImmutableArray<a>) => ImmutableArray<a>
1813
1859
  ```
1814
1860
 
1815
1861
  Creates a new array in which the element at the specified index is set to a
@@ -1817,17 +1863,17 @@ new value. A negative index is treated as an offset from the end of the array.
1817
1863
 
1818
1864
  Parameters:
1819
1865
 
1820
- |param|type|description|
1821
- |-----|----|-----------|
1822
- |`index`|`Number`|The index to update|
1823
- |`value`|`a`|The value to store|
1824
- |`array`|`ImmutableArray<a>`|The array to update|
1866
+ | param | type | description |
1867
+ | ------- | ------------------- | ------------------- |
1868
+ | `index` | `Number` | The index to update |
1869
+ | `value` | `a` | The value to store |
1870
+ | `array` | `ImmutableArray<a>` | The array to update |
1825
1871
 
1826
1872
  Returns:
1827
1873
 
1828
- |type|description|
1829
- |----|-----------|
1830
- |`ImmutableArray<a>`|A new array containing the new element at the given index|
1874
+ | type | description |
1875
+ | ------------------- | --------------------------------------------------------- |
1876
+ | `ImmutableArray<a>` | A new array containing the new element at the given index |
1831
1877
 
1832
1878
  Throws:
1833
1879
 
@@ -1860,7 +1906,7 @@ assert array == Immutable.fromList([1, 9, 3, 4, 5])
1860
1906
  </details>
1861
1907
 
1862
1908
  ```grain
1863
- append :
1909
+ append:
1864
1910
  (array1: ImmutableArray<a>, array2: ImmutableArray<a>) => ImmutableArray<a>
1865
1911
  ```
1866
1912
 
@@ -1869,16 +1915,16 @@ the elements of the second array.
1869
1915
 
1870
1916
  Parameters:
1871
1917
 
1872
- |param|type|description|
1873
- |-----|----|-----------|
1874
- |`array1`|`ImmutableArray<a>`|The array containing elements to appear first|
1875
- |`array2`|`ImmutableArray<a>`|The array containing elements to appear second|
1918
+ | param | type | description |
1919
+ | -------- | ------------------- | ---------------------------------------------- |
1920
+ | `array1` | `ImmutableArray<a>` | The array containing elements to appear first |
1921
+ | `array2` | `ImmutableArray<a>` | The array containing elements to appear second |
1876
1922
 
1877
1923
  Returns:
1878
1924
 
1879
- |type|description|
1880
- |----|-----------|
1881
- |`ImmutableArray<a>`|The new array containing elements from `array1` followed by elements from `array2`|
1925
+ | type | description |
1926
+ | ------------------- | ---------------------------------------------------------------------------------- |
1927
+ | `ImmutableArray<a>` | The new array containing elements from `array1` followed by elements from `array2` |
1882
1928
 
1883
1929
  Examples:
1884
1930
 
@@ -1906,7 +1952,7 @@ assert arr2 == Immutable.fromList([3, 4, 5])
1906
1952
  </details>
1907
1953
 
1908
1954
  ```grain
1909
- concat : (arrays: List<ImmutableArray<a>>) => ImmutableArray<a>
1955
+ concat: (arrays: List<ImmutableArray<a>>) => ImmutableArray<a>
1910
1956
  ```
1911
1957
 
1912
1958
  Creates a single array containing the elements of all arrays in the
@@ -1914,15 +1960,15 @@ provided list.
1914
1960
 
1915
1961
  Parameters:
1916
1962
 
1917
- |param|type|description|
1918
- |-----|----|-----------|
1919
- |`arrays`|`List<ImmutableArray<a>>`|A list containing all arrays to combine|
1963
+ | param | type | description |
1964
+ | -------- | ------------------------- | --------------------------------------- |
1965
+ | `arrays` | `List<ImmutableArray<a>>` | A list containing all arrays to combine |
1920
1966
 
1921
1967
  Returns:
1922
1968
 
1923
- |type|description|
1924
- |----|-----------|
1925
- |`ImmutableArray<a>`|The new array|
1969
+ | type | description |
1970
+ | ------------------- | ------------- |
1971
+ | `ImmutableArray<a>` | The new array |
1926
1972
 
1927
1973
  Examples:
1928
1974
 
@@ -1949,7 +1995,7 @@ assert Immutable.concat([arr1, arr2, arr3]) == Immutable.fromList([1, 2, 3, 4, 5
1949
1995
  </details>
1950
1996
 
1951
1997
  ```grain
1952
- init : (length: Number, fn: (Number => a)) => ImmutableArray<a>
1998
+ init: (length: Number, fn: (Number => a)) => ImmutableArray<a>
1953
1999
  ```
1954
2000
 
1955
2001
  Creates a new array of the specified length where each element is
@@ -1958,16 +2004,16 @@ is called with the index of each array element.
1958
2004
 
1959
2005
  Parameters:
1960
2006
 
1961
- |param|type|description|
1962
- |-----|----|-----------|
1963
- |`length`|`Number`|The length of the new array|
1964
- |`fn`|`Number => a`|The initializer function to call with each index, where the value returned will be used to initialize the element|
2007
+ | param | type | description |
2008
+ | -------- | ------------- | ----------------------------------------------------------------------------------------------------------------- |
2009
+ | `length` | `Number` | The length of the new array |
2010
+ | `fn` | `Number => a` | The initializer function to call with each index, where the value returned will be used to initialize the element |
1965
2011
 
1966
2012
  Returns:
1967
2013
 
1968
- |type|description|
1969
- |----|-----------|
1970
- |`ImmutableArray<a>`|The new array|
2014
+ | type | description |
2015
+ | ------------------- | ------------- |
2016
+ | `ImmutableArray<a>` | The new array |
1971
2017
 
1972
2018
  Examples:
1973
2019
 
@@ -1996,7 +2042,7 @@ assert Immutable.init(5, i => i + 3) == Immutable.fromList([3, 4, 5, 6, 7])
1996
2042
  </details>
1997
2043
 
1998
2044
  ```grain
1999
- make : (length: Number, value: a) => ImmutableArray<a>
2045
+ make: (length: Number, value: a) => ImmutableArray<a>
2000
2046
  ```
2001
2047
 
2002
2048
  Creates a new array of the specified length with each element being
@@ -2004,16 +2050,16 @@ initialized with the given value.
2004
2050
 
2005
2051
  Parameters:
2006
2052
 
2007
- |param|type|description|
2008
- |-----|----|-----------|
2009
- |`length`|`Number`|The length of the new array|
2010
- |`value`|`a`|The value to store at each index|
2053
+ | param | type | description |
2054
+ | -------- | -------- | -------------------------------- |
2055
+ | `length` | `Number` | The length of the new array |
2056
+ | `value` | `a` | The value to store at each index |
2011
2057
 
2012
2058
  Returns:
2013
2059
 
2014
- |type|description|
2015
- |----|-----------|
2016
- |`ImmutableArray<a>`|The new array|
2060
+ | type | description |
2061
+ | ------------------- | ------------- |
2062
+ | `ImmutableArray<a>` | The new array |
2017
2063
 
2018
2064
  Examples:
2019
2065
 
@@ -2037,17 +2083,17 @@ assert Immutable.make(5, "🌾") == Immutable.fromList(["🌾", "🌾", "🌾",
2037
2083
  </details>
2038
2084
 
2039
2085
  ```grain
2040
- forEach : (fn: (a => Void), array: ImmutableArray<a>) => Void
2086
+ forEach: (fn: (a => Void), array: ImmutableArray<a>) => Void
2041
2087
  ```
2042
2088
 
2043
2089
  Iterates an array, calling an iterator function on each element.
2044
2090
 
2045
2091
  Parameters:
2046
2092
 
2047
- |param|type|description|
2048
- |-----|----|-----------|
2049
- |`fn`|`a => Void`|The iterator function to call with each element|
2050
- |`array`|`ImmutableArray<a>`|The array to iterate|
2093
+ | param | type | description |
2094
+ | ------- | ------------------- | ----------------------------------------------- |
2095
+ | `fn` | `a => Void` | The iterator function to call with each element |
2096
+ | `array` | `ImmutableArray<a>` | The array to iterate |
2051
2097
 
2052
2098
  Examples:
2053
2099
 
@@ -2074,18 +2120,18 @@ assert str == "foobarbaz"
2074
2120
  </details>
2075
2121
 
2076
2122
  ```grain
2077
- cycle : (fn: (a => Void), n: Number, array: ImmutableArray<a>) => Void
2123
+ cycle: (fn: (a => Void), n: Number, array: ImmutableArray<a>) => Void
2078
2124
  ```
2079
2125
 
2080
2126
  Iterates an array a given number of times, calling an iterator function on each element.
2081
2127
 
2082
2128
  Parameters:
2083
2129
 
2084
- |param|type|description|
2085
- |-----|----|-----------|
2086
- |`fn`|`a => Void`|The iterator function to call with each element|
2087
- |`n`|`Number`|The number of times to iterate the given array|
2088
- |`array`|`ImmutableArray<a>`|The array to iterate|
2130
+ | param | type | description |
2131
+ | ------- | ------------------- | ----------------------------------------------- |
2132
+ | `fn` | `a => Void` | The iterator function to call with each element |
2133
+ | `n` | `Number` | The number of times to iterate the given array |
2134
+ | `array` | `ImmutableArray<a>` | The array to iterate |
2089
2135
 
2090
2136
  Examples:
2091
2137
 
@@ -2112,7 +2158,7 @@ assert str == "abcabc"
2112
2158
  </details>
2113
2159
 
2114
2160
  ```grain
2115
- map : (fn: (a => b), array: ImmutableArray<a>) => ImmutableArray<b>
2161
+ map: (fn: (a => b), array: ImmutableArray<a>) => ImmutableArray<b>
2116
2162
  ```
2117
2163
 
2118
2164
  Produces a new array initialized with the results of a mapper function
@@ -2120,16 +2166,16 @@ called on each element of the input array.
2120
2166
 
2121
2167
  Parameters:
2122
2168
 
2123
- |param|type|description|
2124
- |-----|----|-----------|
2125
- |`fn`|`a => b`|The mapper function to call on each element, where the value returned will be used to initialize the element in the new array|
2126
- |`array`|`ImmutableArray<a>`|The array to iterate|
2169
+ | param | type | description |
2170
+ | ------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
2171
+ | `fn` | `a => b` | The mapper function to call on each element, where the value returned will be used to initialize the element in the new array |
2172
+ | `array` | `ImmutableArray<a>` | The array to iterate |
2127
2173
 
2128
2174
  Returns:
2129
2175
 
2130
- |type|description|
2131
- |----|-----------|
2132
- |`ImmutableArray<b>`|The new array with mapped values|
2176
+ | type | description |
2177
+ | ------------------- | -------------------------------- |
2178
+ | `ImmutableArray<b>` | The new array with mapped values |
2133
2179
 
2134
2180
  Examples:
2135
2181
 
@@ -2155,7 +2201,7 @@ assert arr == Immutable.fromList(["foo_", "bar_", "baz_"])
2155
2201
  </details>
2156
2202
 
2157
2203
  ```grain
2158
- reduce : (fn: ((a, b) => a), initial: a, array: ImmutableArray<b>) => a
2204
+ reduce: (fn: ((a, b) => a), initial: a, array: ImmutableArray<b>) => a
2159
2205
  ```
2160
2206
 
2161
2207
  Combines all elements of an array using a reducer function,
@@ -2168,17 +2214,17 @@ returned. The accumulator starts with value `initial`.
2168
2214
 
2169
2215
  Parameters:
2170
2216
 
2171
- |param|type|description|
2172
- |-----|----|-----------|
2173
- |`fn`|`(a, b) => a`|The reducer function to call on each element, where the value returned will be the next accumulator value|
2174
- |`initial`|`a`|The initial value to use for the accumulator on the first iteration|
2175
- |`array`|`ImmutableArray<b>`|The array to iterate|
2217
+ | param | type | description |
2218
+ | --------- | ------------------- | --------------------------------------------------------------------------------------------------------- |
2219
+ | `fn` | `(a, b) => a` | The reducer function to call on each element, where the value returned will be the next accumulator value |
2220
+ | `initial` | `a` | The initial value to use for the accumulator on the first iteration |
2221
+ | `array` | `ImmutableArray<b>` | The array to iterate |
2176
2222
 
2177
2223
  Returns:
2178
2224
 
2179
- |type|description|
2180
- |----|-----------|
2181
- |`a`|The final accumulator returned from `fn`|
2225
+ | type | description |
2226
+ | ---- | ---------------------------------------- |
2227
+ | `a` | The final accumulator returned from `fn` |
2182
2228
 
2183
2229
  Examples:
2184
2230
 
@@ -2203,7 +2249,7 @@ assert Immutable.reduce((acc, x) => acc + x, 0, arr) == 6
2203
2249
  </details>
2204
2250
 
2205
2251
  ```grain
2206
- reduceRight : (fn: ((a, b) => b), initial: b, array: ImmutableArray<a>) => b
2252
+ reduceRight: (fn: ((a, b) => b), initial: b, array: ImmutableArray<a>) => b
2207
2253
  ```
2208
2254
 
2209
2255
  Combines all elements of an array using a reducer function,
@@ -2216,17 +2262,17 @@ returned. The accumulator starts with value `initial`.
2216
2262
 
2217
2263
  Parameters:
2218
2264
 
2219
- |param|type|description|
2220
- |-----|----|-----------|
2221
- |`fn`|`(a, b) => b`|The reducer function to call on each element, where the value returned will be the next accumulator value|
2222
- |`initial`|`b`|The initial value to use for the accumulator on the first iteration|
2223
- |`array`|`ImmutableArray<a>`|The array to iterate|
2265
+ | param | type | description |
2266
+ | --------- | ------------------- | --------------------------------------------------------------------------------------------------------- |
2267
+ | `fn` | `(a, b) => b` | The reducer function to call on each element, where the value returned will be the next accumulator value |
2268
+ | `initial` | `b` | The initial value to use for the accumulator on the first iteration |
2269
+ | `array` | `ImmutableArray<a>` | The array to iterate |
2224
2270
 
2225
2271
  Returns:
2226
2272
 
2227
- |type|description|
2228
- |----|-----------|
2229
- |`b`|The final accumulator returned from `fn`|
2273
+ | type | description |
2274
+ | ---- | ---------------------------------------- |
2275
+ | `b` | The final accumulator returned from `fn` |
2230
2276
 
2231
2277
  Examples:
2232
2278
 
@@ -2251,7 +2297,7 @@ assert Immutable.reduceRight((x, acc) => acc ++ x, "", arr) == "foobarbaz"
2251
2297
  </details>
2252
2298
 
2253
2299
  ```grain
2254
- flatMap :
2300
+ flatMap:
2255
2301
  (fn: (a => ImmutableArray<b>), array: ImmutableArray<a>) =>
2256
2302
  ImmutableArray<b>
2257
2303
  ```
@@ -2263,16 +2309,16 @@ of all results.
2263
2309
 
2264
2310
  Parameters:
2265
2311
 
2266
- |param|type|description|
2267
- |-----|----|-----------|
2268
- |`fn`|`a => ImmutableArray<b>`|The function to be called on each element, where the value returned will be an array that gets appended to the new array|
2269
- |`array`|`ImmutableArray<a>`|The array to iterate|
2312
+ | param | type | description |
2313
+ | ------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
2314
+ | `fn` | `a => ImmutableArray<b>` | The function to be called on each element, where the value returned will be an array that gets appended to the new array |
2315
+ | `array` | `ImmutableArray<a>` | The array to iterate |
2270
2316
 
2271
2317
  Returns:
2272
2318
 
2273
- |type|description|
2274
- |----|-----------|
2275
- |`ImmutableArray<b>`|The new array|
2319
+ | type | description |
2320
+ | ------------------- | ------------- |
2321
+ | `ImmutableArray<b>` | The new array |
2276
2322
 
2277
2323
  Examples:
2278
2324
 
@@ -2298,22 +2344,22 @@ assert arr == Immutable.fromList([1, 2, 3, 4, 5, 6])
2298
2344
  </details>
2299
2345
 
2300
2346
  ```grain
2301
- fromList : (list: List<a>) => ImmutableArray<a>
2347
+ fromList: (list: List<a>) => ImmutableArray<a>
2302
2348
  ```
2303
2349
 
2304
2350
  Converts the input list to an array.
2305
2351
 
2306
2352
  Parameters:
2307
2353
 
2308
- |param|type|description|
2309
- |-----|----|-----------|
2310
- |`list`|`List<a>`|The list to convert|
2354
+ | param | type | description |
2355
+ | ------ | --------- | ------------------- |
2356
+ | `list` | `List<a>` | The list to convert |
2311
2357
 
2312
2358
  Returns:
2313
2359
 
2314
- |type|description|
2315
- |----|-----------|
2316
- |`ImmutableArray<a>`|The array containing all elements from the list|
2360
+ | type | description |
2361
+ | ------------------- | ----------------------------------------------- |
2362
+ | `ImmutableArray<a>` | The array containing all elements from the list |
2317
2363
 
2318
2364
  Examples:
2319
2365
 
@@ -2338,22 +2384,22 @@ assert Immutable.get(1, arr) == 2
2338
2384
  </details>
2339
2385
 
2340
2386
  ```grain
2341
- toList : (array: ImmutableArray<a>) => List<a>
2387
+ toList: (array: ImmutableArray<a>) => List<a>
2342
2388
  ```
2343
2389
 
2344
2390
  Converts the input array to a list.
2345
2391
 
2346
2392
  Parameters:
2347
2393
 
2348
- |param|type|description|
2349
- |-----|----|-----------|
2350
- |`array`|`ImmutableArray<a>`|The array to convert|
2394
+ | param | type | description |
2395
+ | ------- | ------------------- | -------------------- |
2396
+ | `array` | `ImmutableArray<a>` | The array to convert |
2351
2397
 
2352
2398
  Returns:
2353
2399
 
2354
- |type|description|
2355
- |----|-----------|
2356
- |`List<a>`|The list containing all elements from the array|
2400
+ | type | description |
2401
+ | --------- | ----------------------------------------------- |
2402
+ | `List<a>` | The list containing all elements from the array |
2357
2403
 
2358
2404
  Examples:
2359
2405
 
@@ -2379,7 +2425,7 @@ assert Immutable.toList(arr) == ['d', 'b', 'c']
2379
2425
  </details>
2380
2426
 
2381
2427
  ```grain
2382
- filter : (fn: (a => Bool), array: ImmutableArray<a>) => ImmutableArray<a>
2428
+ filter: (fn: (a => Bool), array: ImmutableArray<a>) => ImmutableArray<a>
2383
2429
  ```
2384
2430
 
2385
2431
  Produces a new array by calling a function on each element of
@@ -2388,16 +2434,16 @@ the condition.
2388
2434
 
2389
2435
  Parameters:
2390
2436
 
2391
- |param|type|description|
2392
- |-----|----|-----------|
2393
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
2394
- |`array`|`ImmutableArray<a>`|The array to iterate|
2437
+ | param | type | description |
2438
+ | ------- | ------------------- | --------------------------------------------------------------------------------------------------------------- |
2439
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
2440
+ | `array` | `ImmutableArray<a>` | The array to iterate |
2395
2441
 
2396
2442
  Returns:
2397
2443
 
2398
- |type|description|
2399
- |----|-----------|
2400
- |`ImmutableArray<a>`|The new array containing elements where `fn` returned `true`|
2444
+ | type | description |
2445
+ | ------------------- | ------------------------------------------------------------ |
2446
+ | `ImmutableArray<a>` | The new array containing elements where `fn` returned `true` |
2401
2447
 
2402
2448
  Examples:
2403
2449
 
@@ -2423,7 +2469,7 @@ assert Immutable.toList(arr) == ['a', 'a']
2423
2469
  </details>
2424
2470
 
2425
2471
  ```grain
2426
- every : (fn: (a => Bool), array: ImmutableArray<a>) => Bool
2472
+ every: (fn: (a => Bool), array: ImmutableArray<a>) => Bool
2427
2473
  ```
2428
2474
 
2429
2475
  Checks that the given condition is satisfied for all
@@ -2431,16 +2477,16 @@ elements in the input array.
2431
2477
 
2432
2478
  Parameters:
2433
2479
 
2434
- |param|type|description|
2435
- |-----|----|-----------|
2436
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
2437
- |`array`|`ImmutableArray<a>`|The array to check|
2480
+ | param | type | description |
2481
+ | ------- | ------------------- | --------------------------------------------------------------------------------------------------------------- |
2482
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
2483
+ | `array` | `ImmutableArray<a>` | The array to check |
2438
2484
 
2439
2485
  Returns:
2440
2486
 
2441
- |type|description|
2442
- |----|-----------|
2443
- |`Bool`|`true` if all elements satify the condition or `false` otherwise|
2487
+ | type | description |
2488
+ | ------ | ----------------------------------------------------------------- |
2489
+ | `Bool` | `true` if all elements satisfy the condition or `false` otherwise |
2444
2490
 
2445
2491
  Examples:
2446
2492
 
@@ -2471,7 +2517,7 @@ assert Immutable.every(e => e == 'a', arr) == false
2471
2517
  </details>
2472
2518
 
2473
2519
  ```grain
2474
- some : (fn: (a => Bool), array: ImmutableArray<a>) => Bool
2520
+ some: (fn: (a => Bool), array: ImmutableArray<a>) => Bool
2475
2521
  ```
2476
2522
 
2477
2523
  Checks that the given condition is satisfied **at least
@@ -2479,16 +2525,16 @@ once** by an element in the input array.
2479
2525
 
2480
2526
  Parameters:
2481
2527
 
2482
- |param|type|description|
2483
- |-----|----|-----------|
2484
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
2485
- |`array`|`ImmutableArray<a>`|The array to iterate|
2528
+ | param | type | description |
2529
+ | ------- | ------------------- | --------------------------------------------------------------------------------------------------------------- |
2530
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
2531
+ | `array` | `ImmutableArray<a>` | The array to iterate |
2486
2532
 
2487
2533
  Returns:
2488
2534
 
2489
- |type|description|
2490
- |----|-----------|
2491
- |`Bool`|`true` if one or more elements satisfy the condition or `false` otherwise|
2535
+ | type | description |
2536
+ | ------ | ------------------------------------------------------------------------- |
2537
+ | `Bool` | `true` if one or more elements satisfy the condition or `false` otherwise |
2492
2538
 
2493
2539
  Examples:
2494
2540
 
@@ -2519,22 +2565,22 @@ assert Immutable.some(e => e == 'a', arr) == false
2519
2565
  </details>
2520
2566
 
2521
2567
  ```grain
2522
- reverse : (array: ImmutableArray<a>) => ImmutableArray<a>
2568
+ reverse: (array: ImmutableArray<a>) => ImmutableArray<a>
2523
2569
  ```
2524
2570
 
2525
2571
  Creates a new array with all elements in reverse order.
2526
2572
 
2527
2573
  Parameters:
2528
2574
 
2529
- |param|type|description|
2530
- |-----|----|-----------|
2531
- |`array`|`ImmutableArray<a>`|The array to reverse|
2575
+ | param | type | description |
2576
+ | ------- | ------------------- | -------------------- |
2577
+ | `array` | `ImmutableArray<a>` | The array to reverse |
2532
2578
 
2533
2579
  Returns:
2534
2580
 
2535
- |type|description|
2536
- |----|-----------|
2537
- |`ImmutableArray<a>`|The new array|
2581
+ | type | description |
2582
+ | ------------------- | ------------- |
2583
+ | `ImmutableArray<a>` | The new array |
2538
2584
 
2539
2585
  Examples:
2540
2586
 
@@ -2560,7 +2606,7 @@ assert Immutable.toList(arr) == ['c', 'b', 'a']
2560
2606
  </details>
2561
2607
 
2562
2608
  ```grain
2563
- contains : (search: a, array: ImmutableArray<a>) => Bool
2609
+ contains: (search: a, array: ImmutableArray<a>) => Bool
2564
2610
  ```
2565
2611
 
2566
2612
  Checks if the value is an element of the input array.
@@ -2568,16 +2614,16 @@ Uses the generic `==` structural equality operator.
2568
2614
 
2569
2615
  Parameters:
2570
2616
 
2571
- |param|type|description|
2572
- |-----|----|-----------|
2573
- |`search`|`a`|The value to compare|
2574
- |`array`|`ImmutableArray<a>`|The array to inspect|
2617
+ | param | type | description |
2618
+ | -------- | ------------------- | -------------------- |
2619
+ | `search` | `a` | The value to compare |
2620
+ | `array` | `ImmutableArray<a>` | The array to inspect |
2575
2621
 
2576
2622
  Returns:
2577
2623
 
2578
- |type|description|
2579
- |----|-----------|
2580
- |`Bool`|`true` if the value exists in the array or `false` otherwise|
2624
+ | type | description |
2625
+ | ------ | ------------------------------------------------------------ |
2626
+ | `Bool` | `true` if the value exists in the array or `false` otherwise |
2581
2627
 
2582
2628
  Examples:
2583
2629
 
@@ -2608,23 +2654,23 @@ assert Immutable.contains('a', arr) == false
2608
2654
  </details>
2609
2655
 
2610
2656
  ```grain
2611
- find : (fn: (a => Bool), array: ImmutableArray<a>) => Option<a>
2657
+ find: (fn: (a => Bool), array: ImmutableArray<a>) => Option<a>
2612
2658
  ```
2613
2659
 
2614
2660
  Finds the first element in an array that satisfies the given condition.
2615
2661
 
2616
2662
  Parameters:
2617
2663
 
2618
- |param|type|description|
2619
- |-----|----|-----------|
2620
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
2621
- |`array`|`ImmutableArray<a>`|The array to search|
2664
+ | param | type | description |
2665
+ | ------- | ------------------- | --------------------------------------------------------------------------------------------------------------- |
2666
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
2667
+ | `array` | `ImmutableArray<a>` | The array to search |
2622
2668
 
2623
2669
  Returns:
2624
2670
 
2625
- |type|description|
2626
- |----|-----------|
2627
- |`Option<a>`|`Some(element)` containing the first value found or `None` otherwise|
2671
+ | type | description |
2672
+ | ----------- | -------------------------------------------------------------------- |
2673
+ | `Option<a>` | `Some(element)` containing the first value found or `None` otherwise |
2628
2674
 
2629
2675
  Examples:
2630
2676
 
@@ -2655,23 +2701,23 @@ assert Immutable.find(e => e == 2, arr) == None
2655
2701
  </details>
2656
2702
 
2657
2703
  ```grain
2658
- findIndex : (fn: (a => Bool), array: ImmutableArray<a>) => Option<Number>
2704
+ findIndex: (fn: (a => Bool), array: ImmutableArray<a>) => Option<Number>
2659
2705
  ```
2660
2706
 
2661
2707
  Finds the first index in an array where the element satisfies the given condition.
2662
2708
 
2663
2709
  Parameters:
2664
2710
 
2665
- |param|type|description|
2666
- |-----|----|-----------|
2667
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
2668
- |`array`|`ImmutableArray<a>`|The array to search|
2711
+ | param | type | description |
2712
+ | ------- | ------------------- | --------------------------------------------------------------------------------------------------------------- |
2713
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
2714
+ | `array` | `ImmutableArray<a>` | The array to search |
2669
2715
 
2670
2716
  Returns:
2671
2717
 
2672
- |type|description|
2673
- |----|-----------|
2674
- |`Option<Number>`|`Some(index)` containing the index of the first element found or `None` otherwise|
2718
+ | type | description |
2719
+ | ---------------- | --------------------------------------------------------------------------------- |
2720
+ | `Option<Number>` | `Some(index)` containing the index of the first element found or `None` otherwise |
2675
2721
 
2676
2722
  Examples:
2677
2723
 
@@ -2702,7 +2748,7 @@ assert Immutable.findIndex(e => e == 2, arr) == None
2702
2748
  </details>
2703
2749
 
2704
2750
  ```grain
2705
- product :
2751
+ product:
2706
2752
  (array1: ImmutableArray<a>, array2: ImmutableArray<b>) =>
2707
2753
  ImmutableArray<(a, b)>
2708
2754
  ```
@@ -2712,16 +2758,16 @@ all ordered pairs `(a, b)`.
2712
2758
 
2713
2759
  Parameters:
2714
2760
 
2715
- |param|type|description|
2716
- |-----|----|-----------|
2717
- |`array1`|`ImmutableArray<a>`|The array to provide values for the first tuple element|
2718
- |`array2`|`ImmutableArray<b>`|The array to provide values for the second tuple element|
2761
+ | param | type | description |
2762
+ | -------- | ------------------- | -------------------------------------------------------- |
2763
+ | `array1` | `ImmutableArray<a>` | The array to provide values for the first tuple element |
2764
+ | `array2` | `ImmutableArray<b>` | The array to provide values for the second tuple element |
2719
2765
 
2720
2766
  Returns:
2721
2767
 
2722
- |type|description|
2723
- |----|-----------|
2724
- |`ImmutableArray<(a, b)>`|The new array containing all pairs of `(a, b)`|
2768
+ | type | description |
2769
+ | ------------------------ | ---------------------------------------------- |
2770
+ | `ImmutableArray<(a, b)>` | The new array containing all pairs of `(a, b)` |
2725
2771
 
2726
2772
  Examples:
2727
2773
 
@@ -2747,23 +2793,23 @@ assert Immutable.product(arr1, arr2) == Immutable.fromList([(1, 3), (1, 4), (2,
2747
2793
  </details>
2748
2794
 
2749
2795
  ```grain
2750
- count : (fn: (a => Bool), array: ImmutableArray<a>) => Number
2796
+ count: (fn: (a => Bool), array: ImmutableArray<a>) => Number
2751
2797
  ```
2752
2798
 
2753
2799
  Counts the number of elements in an array that satisfy the given condition.
2754
2800
 
2755
2801
  Parameters:
2756
2802
 
2757
- |param|type|description|
2758
- |-----|----|-----------|
2759
- |`fn`|`a => Bool`|The function to call on each element, where the returned value indicates if the element satisfies the condition|
2760
- |`array`|`ImmutableArray<a>`|The array to iterate|
2803
+ | param | type | description |
2804
+ | ------- | ------------------- | --------------------------------------------------------------------------------------------------------------- |
2805
+ | `fn` | `a => Bool` | The function to call on each element, where the returned value indicates if the element satisfies the condition |
2806
+ | `array` | `ImmutableArray<a>` | The array to iterate |
2761
2807
 
2762
2808
  Returns:
2763
2809
 
2764
- |type|description|
2765
- |----|-----------|
2766
- |`Number`|The total number of elements that satisfy the condition|
2810
+ | type | description |
2811
+ | -------- | ------------------------------------------------------- |
2812
+ | `Number` | The total number of elements that satisfy the condition |
2767
2813
 
2768
2814
  Examples:
2769
2815
 
@@ -2788,7 +2834,7 @@ assert Immutable.count(e => e == 1, arr) == 2
2788
2834
  </details>
2789
2835
 
2790
2836
  ```grain
2791
- unique : (array: ImmutableArray<a>) => ImmutableArray<a>
2837
+ unique: (array: ImmutableArray<a>) => ImmutableArray<a>
2792
2838
  ```
2793
2839
 
2794
2840
  Produces a new array with any duplicates removed.
@@ -2796,15 +2842,15 @@ Uses the generic `==` structural equality operator.
2796
2842
 
2797
2843
  Parameters:
2798
2844
 
2799
- |param|type|description|
2800
- |-----|----|-----------|
2801
- |`array`|`ImmutableArray<a>`|The array to filter|
2845
+ | param | type | description |
2846
+ | ------- | ------------------- | ------------------- |
2847
+ | `array` | `ImmutableArray<a>` | The array to filter |
2802
2848
 
2803
2849
  Returns:
2804
2850
 
2805
- |type|description|
2806
- |----|-----------|
2807
- |`ImmutableArray<a>`|The new array with only unique values|
2851
+ | type | description |
2852
+ | ------------------- | ------------------------------------- |
2853
+ | `ImmutableArray<a>` | The new array with only unique values |
2808
2854
 
2809
2855
  Examples:
2810
2856
 
@@ -2829,7 +2875,7 @@ assert Immutable.unique(arr) == Immutable.fromList([1, 2, 3, 4])
2829
2875
  </details>
2830
2876
 
2831
2877
  ```grain
2832
- zip :
2878
+ zip:
2833
2879
  (array1: ImmutableArray<a>, array2: ImmutableArray<b>) =>
2834
2880
  ImmutableArray<(a, b)>
2835
2881
  ```
@@ -2843,16 +2889,16 @@ array to have the length of the smaller array.
2843
2889
 
2844
2890
  Parameters:
2845
2891
 
2846
- |param|type|description|
2847
- |-----|----|-----------|
2848
- |`array1`|`ImmutableArray<a>`|The array to provide values for the first tuple element|
2849
- |`array2`|`ImmutableArray<b>`|The array to provide values for the second tuple element|
2892
+ | param | type | description |
2893
+ | -------- | ------------------- | -------------------------------------------------------- |
2894
+ | `array1` | `ImmutableArray<a>` | The array to provide values for the first tuple element |
2895
+ | `array2` | `ImmutableArray<b>` | The array to provide values for the second tuple element |
2850
2896
 
2851
2897
  Returns:
2852
2898
 
2853
- |type|description|
2854
- |----|-----------|
2855
- |`ImmutableArray<(a, b)>`|The new array containing indexed pairs of `(a, b)`|
2899
+ | type | description |
2900
+ | ------------------------ | -------------------------------------------------- |
2901
+ | `ImmutableArray<(a, b)>` | The new array containing indexed pairs of `(a, b)` |
2856
2902
 
2857
2903
  Examples:
2858
2904
 
@@ -2878,7 +2924,7 @@ assert Immutable.zip(arr1, arr2) == Immutable.fromList([(1, 4), (2, 5), (3, 6)])
2878
2924
  </details>
2879
2925
 
2880
2926
  ```grain
2881
- zipWith :
2927
+ zipWith:
2882
2928
  (fn: ((a, b) => c), array1: ImmutableArray<a>, array2: ImmutableArray<b>) =>
2883
2929
  ImmutableArray<c>
2884
2930
  ```
@@ -2894,17 +2940,17 @@ array to have the length of the smaller array.
2894
2940
 
2895
2941
  Parameters:
2896
2942
 
2897
- |param|type|description|
2898
- |-----|----|-----------|
2899
- |`fn`|`(a, b) => c`|The function to apply to pairs of elements|
2900
- |`array1`|`ImmutableArray<a>`|The array whose elements will each be passed to the function as the first argument|
2901
- |`array2`|`ImmutableArray<b>`|The array whose elements will each be passed to the function as the second argument|
2943
+ | param | type | description |
2944
+ | -------- | ------------------- | ----------------------------------------------------------------------------------- |
2945
+ | `fn` | `(a, b) => c` | The function to apply to pairs of elements |
2946
+ | `array1` | `ImmutableArray<a>` | The array whose elements will each be passed to the function as the first argument |
2947
+ | `array2` | `ImmutableArray<b>` | The array whose elements will each be passed to the function as the second argument |
2902
2948
 
2903
2949
  Returns:
2904
2950
 
2905
- |type|description|
2906
- |----|-----------|
2907
- |`ImmutableArray<c>`|The new array containing elements derived from applying the function to pairs of input array elements|
2951
+ | type | description |
2952
+ | ------------------- | ----------------------------------------------------------------------------------------------------- |
2953
+ | `ImmutableArray<c>` | The new array containing elements derived from applying the function to pairs of input array elements |
2908
2954
 
2909
2955
  Examples:
2910
2956
 
@@ -2937,7 +2983,7 @@ assert Immutable.zipWith((a, b) => a * b, arr1, arr2) == Immutable.fromList([4,
2937
2983
  </details>
2938
2984
 
2939
2985
  ```grain
2940
- unzip :
2986
+ unzip:
2941
2987
  (array: ImmutableArray<(a, b)>) => (ImmutableArray<a>, ImmutableArray<b>)
2942
2988
  ```
2943
2989
 
@@ -2945,15 +2991,15 @@ Produces two arrays by splitting apart an array of tuples.
2945
2991
 
2946
2992
  Parameters:
2947
2993
 
2948
- |param|type|description|
2949
- |-----|----|-----------|
2950
- |`array`|`ImmutableArray<(a, b)>`|The array of tuples to split|
2994
+ | param | type | description |
2995
+ | ------- | ------------------------ | ---------------------------- |
2996
+ | `array` | `ImmutableArray<(a, b)>` | The array of tuples to split |
2951
2997
 
2952
2998
  Returns:
2953
2999
 
2954
- |type|description|
2955
- |----|-----------|
2956
- |`(ImmutableArray<a>, ImmutableArray<b>)`|An array containing all elements from the first tuple element and an array containing all elements from the second tuple element|
3000
+ | type | description |
3001
+ | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
3002
+ | `(ImmutableArray<a>, ImmutableArray<b>)` | An array containing all elements from the first tuple element and an array containing all elements from the second tuple element |
2957
3003
 
2958
3004
  Examples:
2959
3005
 
@@ -2980,23 +3026,23 @@ assert Immutable.unzip(arr1) == (arr2, arr3)
2980
3026
  </details>
2981
3027
 
2982
3028
  ```grain
2983
- join : (separator: String, array: ImmutableArray<String>) => String
3029
+ join: (separator: String, array: ImmutableArray<String>) => String
2984
3030
  ```
2985
3031
 
2986
3032
  Concatenates an array of strings into a single string, separated by a separator string.
2987
3033
 
2988
3034
  Parameters:
2989
3035
 
2990
- |param|type|description|
2991
- |-----|----|-----------|
2992
- |`separator`|`String`|The separator to insert between items in the string|
2993
- |`array`|`ImmutableArray<String>`|The input strings|
3036
+ | param | type | description |
3037
+ | ----------- | ------------------------ | --------------------------------------------------- |
3038
+ | `separator` | `String` | The separator to insert between items in the string |
3039
+ | `array` | `ImmutableArray<String>` | The input strings |
2994
3040
 
2995
3041
  Returns:
2996
3042
 
2997
- |type|description|
2998
- |----|-----------|
2999
- |`String`|The concatenated string|
3043
+ | type | description |
3044
+ | -------- | ----------------------- |
3045
+ | `String` | The concatenated string |
3000
3046
 
3001
3047
  Examples:
3002
3048
 
@@ -3022,7 +3068,7 @@ assert Immutable.join(", ", arr) == "a, b, c"
3022
3068
  </details>
3023
3069
 
3024
3070
  ```grain
3025
- slice :
3071
+ slice:
3026
3072
  (start: Number, ?end: Number, array: ImmutableArray<a>) =>
3027
3073
  ImmutableArray<a>
3028
3074
  ```
@@ -3035,17 +3081,17 @@ the end of the array.
3035
3081
 
3036
3082
  Parameters:
3037
3083
 
3038
- |param|type|description|
3039
- |-----|----|-----------|
3040
- |`start`|`Number`|The index of the array where the slice will begin (inclusive)|
3041
- |`?end`|`Number`|The index of the array where the slice will end (exclusive)|
3042
- |`array`|`ImmutableArray<a>`|The array to be sliced|
3084
+ | param | type | description |
3085
+ | ------- | ------------------- | ------------------------------------------------------------- |
3086
+ | `start` | `Number` | The index of the array where the slice will begin (inclusive) |
3087
+ | `?end` | `Number` | The index of the array where the slice will end (exclusive) |
3088
+ | `array` | `ImmutableArray<a>` | The array to be sliced |
3043
3089
 
3044
3090
  Returns:
3045
3091
 
3046
- |type|description|
3047
- |----|-----------|
3048
- |`ImmutableArray<a>`|The subset of the array that was sliced|
3092
+ | type | description |
3093
+ | ------------------- | --------------------------------------- |
3094
+ | `ImmutableArray<a>` | The subset of the array that was sliced |
3049
3095
 
3050
3096
  Examples:
3051
3097
 
@@ -3076,7 +3122,7 @@ assert Immutable.slice(1, end=-1, arr) == Immutable.fromList(['b'])
3076
3122
  </details>
3077
3123
 
3078
3124
  ```grain
3079
- sort :
3125
+ sort:
3080
3126
  (?compare: ((num1: a, num2: a) => Number), array: ImmutableArray<a>) =>
3081
3127
  ImmutableArray<a>
3082
3128
  ```
@@ -3087,16 +3133,16 @@ Ordering is calculated using a comparator function which takes two array element
3087
3133
 
3088
3134
  Parameters:
3089
3135
 
3090
- |param|type|description|
3091
- |-----|----|-----------|
3092
- |`?compare`|`(num1: a, num2: a) => Number`|The comparator function used to indicate sort order|
3093
- |`array`|`ImmutableArray<a>`|The array to be sorted|
3136
+ | param | type | description |
3137
+ | ---------- | ------------------------------ | --------------------------------------------------- |
3138
+ | `?compare` | `(num1: a, num2: a) => Number` | The comparator function used to indicate sort order |
3139
+ | `array` | `ImmutableArray<a>` | The array to be sorted |
3094
3140
 
3095
3141
  Returns:
3096
3142
 
3097
- |type|description|
3098
- |----|-----------|
3099
- |`ImmutableArray<a>`|The sorted array|
3143
+ | type | description |
3144
+ | ------------------- | ---------------- |
3145
+ | `ImmutableArray<a>` | The sorted array |
3100
3146
 
3101
3147
  Examples:
3102
3148
 
@@ -3121,7 +3167,7 @@ assert Immutable.sort(compare=(a, b) => a - b, arr) == Immutable.fromList([1, 2,
3121
3167
  </details>
3122
3168
 
3123
3169
  ```grain
3124
- rotate : (n: Number, array: ImmutableArray<a>) => ImmutableArray<a>
3170
+ rotate: (n: Number, array: ImmutableArray<a>) => ImmutableArray<a>
3125
3171
  ```
3126
3172
 
3127
3173
  Rotates array elements by the specified amount to the left, such that the
@@ -3132,10 +3178,10 @@ specified amount to the right. See examples.
3132
3178
 
3133
3179
  Parameters:
3134
3180
 
3135
- |param|type|description|
3136
- |-----|----|-----------|
3137
- |`n`|`Number`|The number of elements to rotate by|
3138
- |`array`|`ImmutableArray<a>`|The array to be rotated|
3181
+ | param | type | description |
3182
+ | ------- | ------------------- | ----------------------------------- |
3183
+ | `n` | `Number` | The number of elements to rotate by |
3184
+ | `array` | `ImmutableArray<a>` | The array to be rotated |
3139
3185
 
3140
3186
  Examples:
3141
3187