@grain/stdlib 0.4.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/array.gr +18 -18
  3. package/array.md +18 -18
  4. package/bigint.gr +497 -0
  5. package/bigint.md +811 -0
  6. package/buffer.gr +49 -213
  7. package/buffer.md +24 -17
  8. package/bytes.gr +100 -202
  9. package/bytes.md +19 -0
  10. package/char.gr +63 -133
  11. package/exception.md +6 -0
  12. package/float32.gr +39 -78
  13. package/float64.gr +43 -78
  14. package/hash.gr +37 -37
  15. package/int32.gr +152 -198
  16. package/int32.md +104 -0
  17. package/int64.gr +151 -197
  18. package/int64.md +104 -0
  19. package/list.gr +467 -70
  20. package/list.md +1141 -0
  21. package/map.gr +192 -7
  22. package/map.md +525 -0
  23. package/number.gr +30 -54
  24. package/number.md +3 -3
  25. package/option.md +1 -1
  26. package/package.json +3 -3
  27. package/pervasives.gr +499 -59
  28. package/pervasives.md +1116 -0
  29. package/queue.gr +4 -0
  30. package/queue.md +10 -0
  31. package/random.gr +196 -0
  32. package/random.md +179 -0
  33. package/regex.gr +1833 -842
  34. package/regex.md +11 -11
  35. package/result.md +1 -1
  36. package/runtime/bigint.gr +2045 -0
  37. package/runtime/bigint.md +326 -0
  38. package/runtime/dataStructures.gr +99 -278
  39. package/runtime/dataStructures.md +391 -0
  40. package/runtime/debug.md +6 -0
  41. package/runtime/equal.gr +5 -23
  42. package/runtime/equal.md +6 -0
  43. package/runtime/exception.md +30 -0
  44. package/runtime/gc.gr +20 -3
  45. package/runtime/gc.md +36 -0
  46. package/runtime/malloc.gr +13 -11
  47. package/runtime/malloc.md +55 -0
  48. package/runtime/numberUtils.gr +91 -41
  49. package/runtime/numberUtils.md +54 -0
  50. package/runtime/numbers.gr +1043 -391
  51. package/runtime/numbers.md +300 -0
  52. package/runtime/string.gr +136 -230
  53. package/runtime/string.md +24 -0
  54. package/runtime/stringUtils.gr +58 -38
  55. package/runtime/stringUtils.md +6 -0
  56. package/runtime/unsafe/constants.gr +17 -0
  57. package/runtime/unsafe/constants.md +72 -0
  58. package/runtime/unsafe/conv.md +71 -0
  59. package/runtime/unsafe/errors.md +204 -0
  60. package/runtime/unsafe/memory.md +54 -0
  61. package/runtime/unsafe/printWasm.md +24 -0
  62. package/runtime/unsafe/tags.gr +9 -8
  63. package/runtime/unsafe/tags.md +120 -0
  64. package/runtime/unsafe/wasmf32.md +168 -0
  65. package/runtime/unsafe/wasmf64.md +168 -0
  66. package/runtime/unsafe/wasmi32.md +282 -0
  67. package/runtime/unsafe/wasmi64.md +300 -0
  68. package/runtime/utils/printing.gr +62 -0
  69. package/runtime/utils/printing.md +18 -0
  70. package/runtime/wasi.gr +1 -1
  71. package/runtime/wasi.md +839 -0
  72. package/set.gr +17 -8
  73. package/set.md +24 -21
  74. package/stack.gr +3 -3
  75. package/stack.md +4 -6
  76. package/string.gr +194 -329
  77. package/string.md +3 -3
  78. package/sys/file.gr +245 -429
  79. package/sys/process.gr +27 -45
  80. package/sys/random.gr +47 -16
  81. package/sys/random.md +38 -0
  82. package/sys/time.gr +11 -27
package/CHANGELOG.md CHANGED
@@ -1,5 +1,78 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.0](https://github.com/grain-lang/grain/compare/stdlib-v0.4.6...stdlib-v0.5.0) (2022-06-05)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **stdlib:** Use explicit exports for Pervasives (#1301)
9
+ * **stdlib:** Remove `sum` function from the List module (#1300)
10
+ * **stdlib:** Ensure Void return for forEach functions in List module (#1307)
11
+ * **stdlib:** Provide correct types for BigInt operations (#1297)
12
+ * **grainfmt:** Replace `--in-place` flag with `-o` flag
13
+ * **grainfmt:** Remove stdin formatting support
14
+ * **compiler:** Arbitrary-Precision Integer Arithmetic (#1167)
15
+ * Drop node 14 support (#1092)
16
+ * **stdlib:** Add explicit void return type on Set.forEach (#1225)
17
+ * **stdlib:** Add explicit void return type on Map.forEach (#1220)
18
+ * **stdlib:** Add type aliases to regex lib (#1036)
19
+ * **compiler:** Stack-allocated Chars (#1103)
20
+ * **stdlib:** Align Buffer's `addStringSlice` API with String's `slice` (#1136)
21
+ * **graindoc:** Add `--current-version` flag, required for since/history attributes (#1116)
22
+ * **compiler:** Remove decRefIgnoreZeros (#1068)
23
+ * **compiler:** Add `--memory-base` flag (#1115)
24
+ * **compiler:** Re-implement Grain parser (#1033)
25
+
26
+ ### Features
27
+
28
+ * **compiler:** Add `--memory-base` flag ([#1115](https://github.com/grain-lang/grain/issues/1115)) ([0680826](https://github.com/grain-lang/grain/commit/068082663c4387c3ab54c052869e9b9a06b87e26))
29
+ * **compiler:** Arbitrary-Precision Integer Arithmetic ([#1167](https://github.com/grain-lang/grain/issues/1167)) ([6f34de2](https://github.com/grain-lang/grain/commit/6f34de214b28358ea1df553685fa3a19336ddba9))
30
+ * **compiler:** Call known functions across module boundaries ([#1175](https://github.com/grain-lang/grain/issues/1175)) ([b2d7440](https://github.com/grain-lang/grain/commit/b2d744034ec7e0601554531c910e9d0f5451d464))
31
+ * **compiler:** Convert `runtime/dataStructures.gr` to primitives ([#1145](https://github.com/grain-lang/grain/issues/1145)) ([2d43b28](https://github.com/grain-lang/grain/commit/2d43b286141df75f6b92300e48d2bc4804014872))
32
+ * **compiler:** Convert Sys libraries to [@unsafe](https://github.com/unsafe) ([#1272](https://github.com/grain-lang/grain/issues/1272)) ([fcdfc2a](https://github.com/grain-lang/grain/commit/fcdfc2a815be889d5f0424a04dd5b2373dbd983b))
33
+ * **compiler:** Don't close over global values ([#1134](https://github.com/grain-lang/grain/issues/1134)) ([e8caec6](https://github.com/grain-lang/grain/commit/e8caec6c2a5892e955c8827b18d8d436bebe6073))
34
+ * **compiler:** Re-implement Grain parser ([#1033](https://github.com/grain-lang/grain/issues/1033)) ([9dc3c96](https://github.com/grain-lang/grain/commit/9dc3c96f87a0b2affe9db36e1b03360d198f79f1))
35
+ * **compiler:** Stack-allocated Chars ([#1103](https://github.com/grain-lang/grain/issues/1103)) ([095385e](https://github.com/grain-lang/grain/commit/095385e7c67bbc7a417a21acaf6f1c498c75ce63))
36
+ * **graindoc:** Add `--current-version` flag, required for since/history attributes ([#1116](https://github.com/grain-lang/grain/issues/1116)) ([0f681ea](https://github.com/grain-lang/grain/commit/0f681ea140749395f3ce99a460f30778537183ac))
37
+ * **graindoc:** Allow directory input & output ([#1263](https://github.com/grain-lang/grain/issues/1263)) ([d4cb8ab](https://github.com/grain-lang/grain/commit/d4cb8abcb4accafeb3cae0bac77eee9a365e464d))
38
+ * **grainfmt:** Allow directory input & output ([#1274](https://github.com/grain-lang/grain/issues/1274)) ([d3e7a33](https://github.com/grain-lang/grain/commit/d3e7a33b01352a9c2bcc3b17a5b2995451d92221))
39
+ * **grainfmt:** Replace `--in-place` flag with `-o` flag ([d3e7a33](https://github.com/grain-lang/grain/commit/d3e7a33b01352a9c2bcc3b17a5b2995451d92221))
40
+ * **stdlib:** Add module for pseudo-random number generation ([#921](https://github.com/grain-lang/grain/issues/921)) ([db1fa4e](https://github.com/grain-lang/grain/commit/db1fa4e491d35bb582beaba12157884647384a77))
41
+ * **stdlib:** Add unsigned versions of Int32/Int64 comparison operations ([#831](https://github.com/grain-lang/grain/issues/831)) ([5f20868](https://github.com/grain-lang/grain/commit/5f20868e7b6e3f52d62c8531d99d1130ca84961e))
42
+ * **stdlib:** Added Bytes.clear function. Avoid allocation in Buffer.clear ([#1124](https://github.com/grain-lang/grain/issues/1124)) ([4afd17a](https://github.com/grain-lang/grain/commit/4afd17a91e59027fa7af0fe58977bdbe942f8072))
43
+ * **stdlib:** Convert runtime printing utils to [@unsafe](https://github.com/unsafe) ([#1135](https://github.com/grain-lang/grain/issues/1135)) ([403e1d2](https://github.com/grain-lang/grain/commit/403e1d20e2082fe2dcd2721f83f6c2b36d4154bf))
44
+
45
+
46
+ ### Bug Fixes
47
+
48
+ * **cli:** Ensure parent flags are inherited by the format command ([d3e7a33](https://github.com/grain-lang/grain/commit/d3e7a33b01352a9c2bcc3b17a5b2995451d92221))
49
+ * **graindoc:** Add parens around infix operators in titles ([#1303](https://github.com/grain-lang/grain/issues/1303)) ([acba9c1](https://github.com/grain-lang/grain/commit/acba9c1757688756c3ca98b22a0a159b8d8f9e7d))
50
+ * **graindoc:** Preserve indentation in Doc comments during trim ([#1119](https://github.com/grain-lang/grain/issues/1119)) ([b8a6d57](https://github.com/grain-lang/grain/commit/b8a6d57cce274bfbc2cc16c5b25215b042d4264c))
51
+ * **graindoc:** Remove spaces between parens and infix idents ([#1302](https://github.com/grain-lang/grain/issues/1302)) ([95e596f](https://github.com/grain-lang/grain/commit/95e596fa3fdae5a8a0e07d76ff8c11eeab99e8d7))
52
+ * **graindoc:** Use value_descriptions and type_declarations defined by the module signature ([#1241](https://github.com/grain-lang/grain/issues/1241)) ([5896242](https://github.com/grain-lang/grain/commit/5896242c324622f3329c144bd2c9642aade9d049))
53
+ * **grainfmt:** Remove parens around annotated types ([#1109](https://github.com/grain-lang/grain/issues/1109)) ([0ca66bd](https://github.com/grain-lang/grain/commit/0ca66bd43703826f86ef5b28b49d250af219fb0b))
54
+ * **stdlib:** Add explicit void return type on Map.forEach ([#1220](https://github.com/grain-lang/grain/issues/1220)) ([ab2066a](https://github.com/grain-lang/grain/commit/ab2066aadffa8813344d9df7c7a10ec0f76751b6))
55
+ * **stdlib:** Add explicit void return type on Set.forEach ([#1225](https://github.com/grain-lang/grain/issues/1225)) ([694e6cf](https://github.com/grain-lang/grain/commit/694e6cf8fcd061a77b2915dc0ea9e9b1ae143ae4))
56
+ * **stdlib:** Align Buffer's `addStringSlice` API with String's `slice` ([#1136](https://github.com/grain-lang/grain/issues/1136)) ([0c7cb82](https://github.com/grain-lang/grain/commit/0c7cb820d49cda74598680cc614c0d893b4d2b40))
57
+ * **stdlib:** Buffer.toBytes should not expose the raw instance of Bytes used by the buffer ([#1130](https://github.com/grain-lang/grain/issues/1130)) ([d2bb585](https://github.com/grain-lang/grain/commit/d2bb585d3e2092f1331a679f4e84a9500b8c87a5))
58
+ * **stdlib:** Ensure Void return for forEach functions in List module ([#1307](https://github.com/grain-lang/grain/issues/1307)) ([31f480c](https://github.com/grain-lang/grain/commit/31f480c22e0a39b347fc3a48e1d0b5bd40c2f19e))
59
+ * **stdlib:** Fix float printing in dtoa ([#1165](https://github.com/grain-lang/grain/issues/1165)) ([2987210](https://github.com/grain-lang/grain/commit/2987210648873ab474990ff2b7146a489fecb268))
60
+ * **stdlib:** Fixed a memory leak in Buffer.addStringSlice. ([#1122](https://github.com/grain-lang/grain/issues/1122)) ([c4e1911](https://github.com/grain-lang/grain/commit/c4e19110bd9923e58a7953fcbcef18bf07f3efd6))
61
+ * **stdlib:** Fixed length and byteLength for strings over 2GiB. ([#1126](https://github.com/grain-lang/grain/issues/1126)) ([08a9487](https://github.com/grain-lang/grain/commit/08a948709270a9aa4ac853c2887bc652c4734f36))
62
+ * **stdlib:** Make Bytes.length handle sizes over 2GiB ([#1123](https://github.com/grain-lang/grain/issues/1123)) ([d7386eb](https://github.com/grain-lang/grain/commit/d7386eb36c32452d69a734b447015b4db23f1ac4))
63
+ * **stdlib:** Provide correct types for BigInt operations ([#1297](https://github.com/grain-lang/grain/issues/1297)) ([fdd2f1c](https://github.com/grain-lang/grain/commit/fdd2f1c49b938a013d6ae199b5e662cb93d051e6))
64
+ * **stdlib:** Remove intermediate resizes in Buffer.autogrow ([#1125](https://github.com/grain-lang/grain/issues/1125)) ([c1695d0](https://github.com/grain-lang/grain/commit/c1695d066ccd40b3118c5c870353addeef67bfc1))
65
+ * **stdlib:** Use explicit exports for Pervasives ([#1301](https://github.com/grain-lang/grain/issues/1301)) ([bad5897](https://github.com/grain-lang/grain/commit/bad5897062444ec4d4ace805adcd382725b86125))
66
+
67
+
68
+ ### Miscellaneous Chores
69
+
70
+ * **compiler:** Remove decRefIgnoreZeros ([#1068](https://github.com/grain-lang/grain/issues/1068)) ([3ae8eaa](https://github.com/grain-lang/grain/commit/3ae8eaabad4467304c500c2f0cc9c40749d8513b))
71
+ * Drop node 14 support ([#1092](https://github.com/grain-lang/grain/issues/1092)) ([ef4358f](https://github.com/grain-lang/grain/commit/ef4358ff7de14a35edf3e971e04513d497fe1574))
72
+ * **grainfmt:** Remove stdin formatting support ([d3e7a33](https://github.com/grain-lang/grain/commit/d3e7a33b01352a9c2bcc3b17a5b2995451d92221))
73
+ * **stdlib:** Add type aliases to regex lib ([#1036](https://github.com/grain-lang/grain/issues/1036)) ([a926ea5](https://github.com/grain-lang/grain/commit/a926ea5cafa18e46487a585abbdf5460b15b4f48))
74
+ * **stdlib:** Remove `sum` function from the List module ([#1300](https://github.com/grain-lang/grain/issues/1300)) ([9101615](https://github.com/grain-lang/grain/commit/9101615688f20310ae32573f93f36cfcf5c69be1))
75
+
3
76
  ### [0.4.6](https://www.github.com/grain-lang/grain/compare/stdlib-v0.4.5...stdlib-v0.4.6) (2022-01-17)
4
77
 
5
78
 
package/array.gr CHANGED
@@ -43,7 +43,7 @@ let initLength = length => {
43
43
  }
44
44
 
45
45
  /**
46
- * Returns the length of the input array.
46
+ * Provides the length of the input array.
47
47
  *
48
48
  * @param array: The array to inspect
49
49
  * @returns The number of elements in the array
@@ -52,7 +52,7 @@ let initLength = length => {
52
52
  */
53
53
  @disableGC
54
54
  export let rec length = array => {
55
- let ptr = WasmI32.fromGrain(array: (Array<a>))
55
+ let ptr = WasmI32.fromGrain(array: Array<a>)
56
56
  let ret = tagSimpleNumber(WasmI32.load(ptr, _ARRAY_LENGTH_OFFSET))
57
57
  Memory.decRef(ptr)
58
58
  Memory.decRef(WasmI32.fromGrain(length))
@@ -89,7 +89,7 @@ export let rec make /*: (Number, a) -> Array<a>*/ =
89
89
  _ARRAY_START_OFFSET
90
90
  )
91
91
  }
92
- let ret = WasmI32.toGrain(array): (Array<a>)
92
+ let ret = WasmI32.toGrain(array): Array<a>
93
93
  Memory.decRef(WasmI32.fromGrain(lengthArg))
94
94
  Memory.decRef(WasmI32.fromGrain(item))
95
95
  Memory.decRef(WasmI32.fromGrain(make))
@@ -105,7 +105,7 @@ export let rec make /*: (Number, a) -> Array<a>*/ =
105
105
  * @param fn: The initializer function to call with each index, where the value returned will be used to initialize the element
106
106
  * @returns The new array
107
107
  *
108
- * @example Array.init(5, n => n + 3) // [> 8, 9, 10, 11, 12]
108
+ * @example Array.init(5, n => n + 3) // [> 3, 4, 5, 6, 7]
109
109
  *
110
110
  * @since v0.1.0
111
111
  */
@@ -133,7 +133,7 @@ export let rec init /*: (Number, Number -> a) -> Array<a>*/ =
133
133
  }
134
134
  Memory.decRef(WasmI32.fromGrain(fn))
135
135
  Memory.decRef(WasmI32.fromGrain(init))
136
- WasmI32.toGrain(array): (Array<a>)
136
+ WasmI32.toGrain(array): Array<a>
137
137
  }
138
138
 
139
139
  /**
@@ -171,8 +171,8 @@ export let set = (index, value, array) => {
171
171
  }
172
172
 
173
173
  /**
174
- * Creates a new array with the items the first array, followed by
175
- * the items of the second array. This does not modify the arguments.
174
+ * Creates a new array with the elements of the first array followed by
175
+ * the elements of the second array. This does not modify the arguments.
176
176
  *
177
177
  * @param array1: The array containing elements to appear first
178
178
  * @param array2: The array containing elements to appear second
@@ -283,7 +283,7 @@ export let forEach = (fn, array) => {
283
283
  }
284
284
 
285
285
  /**
286
- * Iterates an array, calling an iterator function with each element.
286
+ * Iterates an array, calling an iterator function on each element.
287
287
  * Also passes the index as the second argument to the function.
288
288
  *
289
289
  * @param fn: The iterator function to call with each element
@@ -403,7 +403,7 @@ export let flatMap = (fn, array) => {
403
403
  *
404
404
  * @param fn: The function to call on each element, where the returned value indicates if the element satisfies the condition
405
405
  * @param array: The array to check
406
- * @returns `true` if all elements satify the condition, otherwise `false`
406
+ * @returns `true` if all elements satify the condition or `false` otherwise
407
407
  *
408
408
  * @since v0.3.0
409
409
  */
@@ -415,11 +415,11 @@ export let every = (fn, array) => {
415
415
 
416
416
  /**
417
417
  * Checks that the given condition is satisfied **at least
418
- * once** by an item in the input array.
418
+ * once** by an element in the input array.
419
419
  *
420
420
  * @param fn: The function to call on each element, where the returned value indicates if the element satisfies the condition
421
421
  * @param array: The array to iterate
422
- * @returns `true` if one or more elements satify the condition, otherwise `false`
422
+ * @returns `true` if one or more elements satify the condition or `false` otherwise
423
423
  *
424
424
  * @since v0.3.0
425
425
  */
@@ -549,8 +549,8 @@ export let fromList = list => {
549
549
  * Uses the generic `==` structural equality operator.
550
550
  *
551
551
  * @param search: The value to compare
552
- * @param array: The array to iterate
553
- * @returns `true` if the value exists in the array, otherwise `false`
552
+ * @param array: The array to inspect
553
+ * @returns `true` if the value exists in the array or `false` otherwise
554
554
  *
555
555
  * @since v0.2.0
556
556
  */
@@ -569,7 +569,7 @@ export let contains = (search, array) => {
569
569
  *
570
570
  * @param fn: The function to call on each element, where the returned value indicates if the element satisfies the condition
571
571
  * @param array: The array to search
572
- * @returns `Some(element)` containing the first value found and `None` otherwise
572
+ * @returns `Some(element)` containing the first value found or `None` otherwise
573
573
  *
574
574
  * @since v0.2.0
575
575
  */
@@ -603,7 +603,7 @@ export let find = (fn, array) => {
603
603
  *
604
604
  * @param fn: The function to call on each element, where the returned value indicates if the element satisfies the condition
605
605
  * @param array: The array to search
606
- * @returns `Some(index)` containing the index of the first element found and `None` otherwise
606
+ * @returns `Some(index)` containing the index of the first element found or `None` otherwise
607
607
  *
608
608
  * @since v0.2.0
609
609
  */
@@ -917,10 +917,10 @@ export let sort = (comp, array) => {
917
917
  }
918
918
 
919
919
  /**
920
- * Rotates an array by n elements to the right, in place.
920
+ * Rotates array elements by the specified amount to the right, in place.
921
921
  *
922
- * If n is negative, the array will be rotated by n elements
923
- * to the left. See examples.
922
+ * If value is negative, array elements will be rotated by the
923
+ * specified amount to the left. See examples.
924
924
  *
925
925
  * @param n: The number of elements to rotate by
926
926
  * @param arr: The array to be rotated
package/array.md CHANGED
@@ -36,7 +36,7 @@ No other changes yet.
36
36
  length : Array<a> -> Number
37
37
  ```
38
38
 
39
- Returns the length of the input array.
39
+ Provides the length of the input array.
40
40
 
41
41
  Parameters:
42
42
 
@@ -114,7 +114,7 @@ Returns:
114
114
  Examples:
115
115
 
116
116
  ```grain
117
- Array.init(5, n => n + 3) // [> 8, 9, 10, 11, 12]
117
+ Array.init(5, n => n + 3) // [> 3, 4, 5, 6, 7]
118
118
  ```
119
119
 
120
120
  ### Array.**get**
@@ -195,8 +195,8 @@ No other changes yet.
195
195
  append : (Array<a>, Array<a>) -> Array<a>
196
196
  ```
197
197
 
198
- Creates a new array with the items the first array, followed by
199
- the items of the second array. This does not modify the arguments.
198
+ Creates a new array with the elements of the first array followed by
199
+ the elements of the second array. This does not modify the arguments.
200
200
 
201
201
  Parameters:
202
202
 
@@ -266,7 +266,7 @@ Returns:
266
266
  ### Array.**cycle**
267
267
 
268
268
  <details disabled>
269
- <summary tabindex="-1">Added in <code>next</code></summary>
269
+ <summary tabindex="-1">Added in <code>0.4.4</code></summary>
270
270
  No other changes yet.
271
271
  </details>
272
272
 
@@ -329,7 +329,7 @@ Parameters:
329
329
  forEachi : (((a, Number) -> Void), Array<a>) -> Void
330
330
  ```
331
331
 
332
- Iterates an array, calling an iterator function with each element.
332
+ Iterates an array, calling an iterator function on each element.
333
333
  Also passes the index as the second argument to the function.
334
334
 
335
335
  Parameters:
@@ -527,7 +527,7 @@ Returns:
527
527
 
528
528
  |type|description|
529
529
  |----|-----------|
530
- |`Bool`|`true` if all elements satify the condition, otherwise `false`|
530
+ |`Bool`|`true` if all elements satify the condition or `false` otherwise|
531
531
 
532
532
  ### Array.**some**
533
533
 
@@ -541,7 +541,7 @@ some : ((a -> Bool), Array<a>) -> Bool
541
541
  ```
542
542
 
543
543
  Checks that the given condition is satisfied **at least
544
- once** by an item in the input array.
544
+ once** by an element in the input array.
545
545
 
546
546
  Parameters:
547
547
 
@@ -554,7 +554,7 @@ Returns:
554
554
 
555
555
  |type|description|
556
556
  |----|-----------|
557
- |`Bool`|`true` if one or more elements satify the condition, otherwise `false`|
557
+ |`Bool`|`true` if one or more elements satify the condition or `false` otherwise|
558
558
 
559
559
  ### Array.**fill**
560
560
 
@@ -693,13 +693,13 @@ Parameters:
693
693
  |param|type|description|
694
694
  |-----|----|-----------|
695
695
  |`search`|`a`|The value to compare|
696
- |`array`|`Array<a>`|The array to iterate|
696
+ |`array`|`Array<a>`|The array to inspect|
697
697
 
698
698
  Returns:
699
699
 
700
700
  |type|description|
701
701
  |----|-----------|
702
- |`Bool`|`true` if the value exists in the array, otherwise `false`|
702
+ |`Bool`|`true` if the value exists in the array or `false` otherwise|
703
703
 
704
704
  ### Array.**find**
705
705
 
@@ -725,7 +725,7 @@ Returns:
725
725
 
726
726
  |type|description|
727
727
  |----|-----------|
728
- |`Option<a>`|`Some(element)` containing the first value found and `None` otherwise|
728
+ |`Option<a>`|`Some(element)` containing the first value found or `None` otherwise|
729
729
 
730
730
  ### Array.**findIndex**
731
731
 
@@ -751,7 +751,7 @@ Returns:
751
751
 
752
752
  |type|description|
753
753
  |----|-----------|
754
- |`Option<Number>`|`Some(index)` containing the index of the first element found and `None` otherwise|
754
+ |`Option<Number>`|`Some(index)` containing the index of the first element found or `None` otherwise|
755
755
 
756
756
  ### Array.**product**
757
757
 
@@ -1030,7 +1030,7 @@ Returns:
1030
1030
  ### Array.**sort**
1031
1031
 
1032
1032
  <details disabled>
1033
- <summary tabindex="-1">Added in <code>next</code></summary>
1033
+ <summary tabindex="-1">Added in <code>0.4.5</code></summary>
1034
1034
  No other changes yet.
1035
1035
  </details>
1036
1036
 
@@ -1052,7 +1052,7 @@ Parameters:
1052
1052
  ### Array.**rotate**
1053
1053
 
1054
1054
  <details disabled>
1055
- <summary tabindex="-1">Added in <code>next</code></summary>
1055
+ <summary tabindex="-1">Added in <code>0.4.5</code></summary>
1056
1056
  No other changes yet.
1057
1057
  </details>
1058
1058
 
@@ -1060,10 +1060,10 @@ No other changes yet.
1060
1060
  rotate : (Number, Array<a>) -> Void
1061
1061
  ```
1062
1062
 
1063
- Rotates an array by n elements to the right, in place.
1063
+ Rotates array elements by the specified amount to the right, in place.
1064
1064
 
1065
- If n is negative, the array will be rotated by n elements
1066
- to the left. See examples.
1065
+ If value is negative, array elements will be rotated by the
1066
+ specified amount to the left. See examples.
1067
1067
 
1068
1068
  Parameters:
1069
1069