You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"documentation": {"kind": "markdown", "value": "\n`zip(a, b)` create an array of pairs from corresponding elements of a and b.\nStop with the shorter array.\n\n## Examples\n\n```rescript\nArray.zip([1, 2], [3, 4, 5]) == [(1, 3), (2, 4)]\n```\n"}
181
187
}, {
182
188
"label": "fillToEnd",
183
189
"kind": 12,
@@ -268,6 +274,12 @@ Path Array.
268
274
"tags": [],
269
275
"detail": "(array<'a>, 'a => 'b) => array<'b>",
270
276
"documentation": {"kind": "markdown", "value": "\n`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nmappedArray == [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```\n"}
"documentation": {"kind": "markdown", "value": "\n`zipBy(xs, ys, f)` create an array by applying `f` to corresponding elements of\n`xs` and `ys`. Stops with shorter array.\n\nEquivalent to `map(zip(xs, ys), ((a, b)) => f(a, b))`\n\n## Examples\n\n```rescript\nArray.zipBy([1, 2, 3], [4, 5], (a, b) => 2 * a + b) == [6, 9]\n```\n"}
271
283
}, {
272
284
"label": "with",
273
285
"kind": 12,
@@ -538,6 +550,12 @@ Path Array.
538
550
"tags": [1],
539
551
"detail": "(array<'a>, int) => 'a",
540
552
"documentation": {"kind": "markdown", "value": "Deprecated: \n\n\n`unsafe_get(array, index)` returns the element at `index` of `array`.\n\nThis is _unsafe_, meaning it will return `undefined` value if `index` does not exist in `array`.\n\nUse `Array.unsafe_get` only when you are sure the `index` exists (i.e. when using for-loop).\n\n## Examples\n\n```rescript\nlet array = [1, 2, 3]\nfor index in 0 to array->Array.length - 1 {\n let value = array->Array.unsafe_get(index)\n Console.log(value)\n}\n```\n"}
553
+
}, {
554
+
"label": "partition",
555
+
"kind": 12,
556
+
"tags": [],
557
+
"detail": "(t<'a>, 'a => bool) => (t<'a>, t<'a>)",
558
+
"documentation": {"kind": "markdown", "value": "\n`partition(f, a)` split array into tuple of two arrays based on predicate `f`;\nfirst of tuple where predicate cause true, second where predicate cause false\n\n## Examples\n\n```rescript\nArray.partition([1, 2, 3, 4, 5], x => mod(x, 2) == 0) == ([2, 4], [1, 3, 5])\n\nArray.partition([1, 2, 3, 4, 5], x => mod(x, 2) != 0) == ([1, 3, 5], [2, 4])\n```\n"}
541
559
}, {
542
560
"label": "copyAllWithin",
543
561
"kind": 12,
@@ -586,6 +604,12 @@ Path Array.
586
604
"tags": [],
587
605
"detail": "(array<'a>, array<'a>) => unit",
588
606
"documentation": {"kind": "markdown", "value": "\n`pushMany(array, itemsArray)` appends many new items to the end of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) on MDN.\n\n## Examples\n\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nsomeArray->Array.pushMany([\"yay\", \"wehoo\"])\nsomeArray == [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```\n"}
"documentation": {"kind": "markdown", "value": "\n`unzip(a)` takes an array of pairs and creates a pair of arrays. The first array\ncontains all the first items of the pairs; the second array contains all the\nsecond items.\n\n## Examples\n\n```rescript\nArray.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])\n\nArray.unzip([(1, 2), (3, 4), (5, 6), (7, 8)]) == ([1, 3, 5, 7], [2, 4, 6, 8])\n```\n"}
"documentation": {"kind": "markdown", "value": "\n`unzip(a)` takes an array of pairs and creates a pair of arrays. The first array\ncontains all the first items of the pairs; the second array contains all the\nsecond items.\n\n## Examples\n\n```rescript\nArray.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])\n\nArray.unzip([(1, 2), (3, 4), (5, 6), (7, 8)]) == ([1, 3, 5, 7], [2, 4, 6, 8])\n```\n"},
0 commit comments