Caml1999I022  s    ;  3Ϡ*Belt_Array!t@  , !a  @A@AH%array@@@   @@&_none_A@ A@@@@@&length@@!a  @@  A#int@@@  @  -%array_lengthAA @@@'res.doc#	e
Return the size of the array

## Examples

```rescript
// Returns 1
Belt.Array.length(["test"])
```
@+@@+@@$size@@'!a  @@  &@@  @  -%array_lengthAA$@@@B#E= See [`Belt.Array.length`]() @M@@M@@#get@@I!a  @@  @J@@  𰳐J&option@@@  @  @  @iJl
  &
If `i <= 0 <= length(arr)` returns `Some(value)` where `value` is the item at index `i`.
If `i` is out of range returns `None`.

## Examples

```rescript
Belt.Array.get(["a", "b", "c"], 0) == Some("a")
Belt.Array.get(["a", "b", "c"], 3) == None
Belt.Array.get(["a", "b", "c"], -1) == None
```
@t@@t@@&getExn@@p!a  @@  @q@@  @  @  @j	^
Raise an exception if `i` is out of range.
Otherwise return the value at index `i` in `arr`.
@@@@@)getUnsafe@@!a  @@  @@@  @  @  1%array_unsafe_getBA@@@@	t
`getUnsafe(arr, i)`

**Unsafe**

no bounds checking; this would cause type error if `i` does not stay within range
@@@@@,getUndefined@@!a  @@  ߰@@@  ళ@"JsA)undefined @@  @  @  1%array_unsafe_getBA@@@@ܠߐ	
`getUndefined(arr, i)`

It does the samething in the runtime as [`getUnsafe`]();
it is _type safe_ since the return type still track whether it is
in range or not
@@@@@#set@@㠰!a  @@  ذ@@@  ٰ@E$bool@@@  @  @  @  @	
`set(arr, n, x)` modifies `arr` in place; it replaces the nth element of `arr`
with `x`. Returning `false` means not updated due to out of range.
@@@@@&setExn@@!a  @@  Ѱ@@@  Ұ@F$unit@@@  @  @  @  @,/	@
`setExn(arr, i, x)` raise an exception if `i` is out of range.
@7@@7@@)setUnsafe@@3!a  @@  ʰ@4@@  ˰@(@@  @  @  @  А1%array_unsafe_setCA8@@@@@X@.shuffleInPlace@@T!a  @@  ǰA@@  @  @kLn	=
`shuffleInPlace(arr)` randomly re-orders the items in `arr`
@v@@v@@'shuffle@@r!a  @@  °z@@  @  @j	G Returns a fresh array with items in original array randomly shuffled. @@@@@.reverseInPlace@@!a  @@  }@@  @  @	
`reverseInPlace(arr)` reverses items in `arr` in place.

## Examples

```rescript
let arr = [10, 11, 12, 13, 14]

let () = Belt.Array.reverseInPlace(arr)

arr == [14, 13, 12, 11, 10]
```
@@@@@'reverse@@!a  @@  @@  @  @ŠȐ	
`reverse(arr)` returns a fresh array with items in arr in reverse order.

## Examples

```rescript
Belt.Array.reverse([10, 11, 12, 13, 14]) == [14, 13, 12, 11, 10]
```
@@@@@1makeUninitialized@@@@  㠰@"JsA)undefined !a  @@  @@  @  %ArrayAA	"            A@%Array@@@@@@򠠠
  /
`makeUninitialized(n)` creates an array of length `n` filled with the undefined
value. You must specify the type of data that will eventually fill the array.

## Examples

```rescript
let arr: array<Js.undefined<string>> = Belt.Array.makeUninitialized(5)

Belt.Array.getExn(arr, 0) == Js.undefined
```
@@@@@7makeUninitializedUnsafe@@@@  !a  @@  @  %ArrayAA	"            A@%Array@@@@@@	
**Unsafe**

## Examples

```rescript
let arr = Belt.Array.makeUninitializedUnsafe(5)

Js.log(Belt.Array.getExn(arr, 0)) // undefined

Belt.Array.setExn(arr, 0, "example")

Js.log(Belt.Array.getExn(arr, 0) == "example")
```
@ @@ @@$make@@@@  @!a  &@@  @  @  @58	n
`make(n, e)` return an array of size `n` filled with value `e`.
Returns an empty array when `n` is negative.
@@@@@@@%range@@3@@  @9@@  YA@@  @@  @  @  @Z;]	
`range(start, finish)` create an inclusive array.

## Examples

```rescript
Belt.Array.range(0, 3) == [0, 1, 2, 3]

Belt.Array.range(3, 0) == []

Belt.Array.range(3, 3) == [3]
```
@e@@e@@'rangeBy@@X@@  @^@@  $stepf@@  n@@  @@  @  @  @  @h
  
`rangeBy(start, finish, ~step)` returns empty array when step is 0 or negative.
It also return an empty array when `start > finish`.

## Examples

```rescript
Belt.Array.rangeBy(0, 10, ~step=3) == [0, 3, 6, 9]

Belt.Array.rangeBy(0, 12, ~step=3) == [0, 3, 6, 9, 12]

Belt.Array.rangeBy(33, 0, ~step=1) == []

Belt.Array.rangeBy(33, 0, ~step=-1) == []

Belt.Array.rangeBy(3, 12, ~step=-1) == []

Belt.Array.rangeBy(3, 3, ~step=0) == []

Belt.Array.rangeBy(3, 3, ~step=1) == [3]
```
@@@@@'makeByU@@@@  @U)function$@@@@  !a  @  ࠠ*Has_arity1@@@  @A@@  @@  @@  @  @  @@&makeBy@@@@  @@@@  !a  @  ɠ@@  @  @  @ؠې
  

`makeBy(n, f)` return an empty array when n is negative return an array of size
n populated by `f(i)` start from `0` to `n - 1`.

## Examples

```rescript
Belt.Array.makeBy(5, (i) => i) == [0, 1, 2, 3, 4]

Belt.Array.makeBy(5, (i) => i * i) == [0, 1, 4, 9, 16]
```
@@@@@1makeByAndShuffleU@@@@  @Q@@@  !a  @  ࠠ*Has_arity1O@@  @A@@  @@  @@  @  @  @@0makeByAndShuffle@@@@ |@@@@ }!a @ ~@@  @  @  @&)	'
Equivalent to `shuffle(makeBy(n, f))`
@1@@1@@#zip@@-!a w@@ t@J!b v@@ uS@ x@@ y@ z@ {@T5W	
`zip(a, b)` create an array of pairs from corresponding elements of a and b.
Stop with the shorter array.

## Examples

```rescript
Belt.Array.zip([1, 2], [3, 4, 5]) == [(1, 3), (2, 4)]
```
@_@@_@@&zipByU@@[!a j@@ f@x!b k@@ g@ܠ@@!c o@ l@ mࠠ*Has_arity2@@ h@A@@ i@@ n@@ p@ q@ r@ s@@%zipBy@@!a ]@@ [@!b ^@@ \@@@!c a@ _@ `@@ b@ c@ d@ e@
  
`zipBy(xs, ys, f)` create an array by applying `f` to corresponding elements of
`xs` and `ys`. Stops with shorter array.

Equivalent to `map(zip(xs, ys), ((a, b)) => f(a, b))`

## Examples

```rescript
Belt.Array.zipBy([1, 2, 3], [4, 5], (a, b) => 2 * a + b) == [6, 9]
```
@@@@@%unzip@@ؠ!a W!b U@ S@@ T٠@@ X@@ V@ Y@ Z@񐠠
  V
`unzip(a)` takes an array of pairs and creates a pair of arrays. The first array
contains all the first items of the pairs; the second array contains all the
second items.

## Examples

```rescript
Belt.Array.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])

Belt.Array.unzip([(1, 2), (3, 4), (5, 6), (7, 8)]) == ([1, 3, 5, 7], [2, 4, 6, 8])
```
@@@@@&concat@@!a O@@ M@
@@ N@@ P@ Q@ R@
  +
`concat(xs, ys)` returns a fresh array containing the concatenation of the arrays
`v1` and `v2`, so even if `v1` or `v2` is empty; it can not be shared.

## Examples

```rescript
Belt.Array.concat([1, 2, 3], [4, 5]) == [1, 2, 3, 4, 5]

Belt.Array.concat([], ["a", "b", "c"]) == ["a", "b", "c"]
```
@@@@@*concatMany@@,!a J@@ H@@ I&	@@ K@ L@58	
`concatMany(xss)` returns a fresh array as the concatenation of `xss` (an array of arrays)

## Examples

```rescript
Belt.Array.concatMany([[1, 2, 3], [4, 5, 6], [7, 8]]) == [1, 2, 3, 4, 5, 6, 7, 8]
```
@@@@@@@%slice@@<!a C@@ @&offset?@@ A#lenG@@ BT@@ D@ E@ F@ G@cDf
  
`slice(xs, offset, len)` creates a new array with the len elements of `xs`
starting at `offset` for `offset` can be negative;and is evaluated as
`length(xs) - offset(slice, xs) - 1(1)` means get the last element as a
singleton array `slice(xs, ~-len, len)` will return a copy of the array if the
array does not have enough data; `slice` extracts through the end of sequence.

if `len` is negative; returns the empty array.

## Examples

```rescript
Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=2, ~len=3) == [12, 13, 14]

Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=-4, ~len=3) == [13, 14, 15]

Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=4, ~len=9) == [14, 15, 16]
```
@n@@n@@*sliceToEnd@@j!a <@@ :@k@@ ;x@@ =@ >@ ?@h
  
`sliceToEnd(xs, offset)` creates a new array with the elements of `xs` starting
at `offset`

`offset` can be negative; and is evaluated as `length(xs) - offset(sliceToEnd, xs) - 1`
means get the last element as a singleton array

`sliceToEnd(xs, 0)` will return a copy of the array

## Examples

```rescript
Belt.Array.sliceToEnd([10, 11, 12, 13, 14, 15, 16], 2) == [12, 13, 14, 15, 16]

Belt.Array.sliceToEnd([10, 11, 12, 13, 14, 15, 16], -4) == [13, 14, 15, 16]
```
@@@@@$copy@@!a 7@@ 6@@ 8@ 9%sliceAA	+      
      AA@A@@%slice@@@@@	^
`copy(a)` returns a copy of `a`; that is; a fresh array containing the same
elements as `a`.
@@@@@$fill@@!a 0@@ -&offset@@ .#len@@ /@@@ 1@ 2@ 3@ 4@ 5@ڠݐ
  
`fill(arr, ~offset, ~len, x)` modifies `arr` in place, storing `x` in elements
number `offset` to `offset + len - 1`. `offset` can be negative; and is evaluated
as `length(arr - offset)`.

`fill(arr, ~offset=-1, ~len=1)` means fill the last element, if the array does not have enough data; `fill` will ignore it

## Examples

```rescript
let arr = Belt.Array.makeBy(5, (i) => i)

Belt.Array.fill(arr, ~offset=2, ~len=2, 9)

arr == [0, 1, 9, 9, 4]

Belt.Array.fill(arr, ~offset=7, ~len=2, 8)

arr == [0, 1, 9, 9, 4]
@@@@@$blit@#src㠰!a #@@ !)srcOffset@@ "#dst@@ $)dstOffset@@ %#len@@ &@@ '@ (@ )@ *@ +@ ,@
  
`blit(~src=v1, ~srcOffset=o1, ~dst=v2, ~dstOffset=o2, ~len)` copies `len` elements
from array `v1`;starting at element number `o1`;to array `v2`, starting at element
number `o2`. It works correctly even if `v1` and `v2` are the same array and the
source and destination chunks overlap.

`offset` can be negative; `-1` means `len - 1`; if `len + offset` is still negative;it will be set as 0

For each of the examples;presume that `v1 == [10, 11, 12, 13, 14, 15, 16, 17]` and `v2 == [20, 21, 22, 23, 24, 25, 26, 27]`. The result shown is the content of the destination array.

## Examples

```rescript
let v1 = [10, 11, 12, 13, 14, 15, 16, 17]
let v2 = [20, 21, 22, 23, 24, 25, 26, 27]

Belt.Array.blit(~src=v1, ~srcOffset=4, ~dst=v2, ~dstOffset=2, ~len=3)
v2 == [20, 21, 14, 15, 16, 25, 26, 27]

Belt.Array.blit(~src=v1, ~srcOffset=4, ~dst=v1, ~dstOffset=2, ~len=3)
v1 == [10, 11, 14, 15, 16, 15, 16, 17]
```
@%@@%@@*blitUnsafe@#src#!a @@ )srcOffset&@@ #dst7@@ )dstOffset6@@ #len>@@ 0@@ @ @ @ @ @  @Z;]	&
Unsafe blit without bounds checking.
@e@@e@@(forEachU@@a!a @@ @נ@V@@ @ ࠠ*Has_arity1@@ @A@@ @@ c@@ @ @ @@'forEach@@!a @@ @@	z@@ @ ~@@ @ 	@ 
@
  
`forEach(xs, f)`

Call `f` on each element of `xs` from the beginning to end. `f` returns `unit`
so no new array is created. Use `forEach` when you are primarily concerned with
repetitively creating side effects.

## Examples

```rescript
Belt.Array.forEach(["a", "b", "c"], x => Js.log("Item: " ++ x))

/*
  prints:
  Item: a
  Item: b
  Item: c
*/
let total = ref(0)

Belt.Array.forEach([1, 2, 3, 4], x => total := total.contents + x)

total.contents == 1 + 2 + 3 + 4
```
@@@@@$mapU@@!a @@ @%@!b  @ ࠠ*Has_arity1@@ @A@@ @@ ߠ@@ @ @ @@#map@@ؠ!a @@ @@	!b @ @@ @ @ @	
`map(xs, f)` returns a new array by calling `f` for each element of `xs` from
the beginning to end.

## Examples

```rescript
Belt.Array.map([1, 2], (x) => x + 1) == [3, 4]
```
@@@@@(flatMapU@@!a @@ @u@"!b @@ @ ࠠ*Has_arity1t@@ @A@@ @@ 4@@ @ @ @1@'flatMap@@-!a @@ @@	L!b @@ @ 㰳U	@@ @ @ @R3U	
`flatMap(xs, f)` returns a new array by calling `f` for each element of `xs` from
the beginning to end, concatenating the results.

## Examples

```rescript
Belt.Array.flatMap([1, 2], x => [x + 10, x + 20]) == [11, 21, 12, 22]
```
@]@@]@@&getByU@@Y!a @@ ְ@Ϡ@v@@ @ ڠࠠ*Has_arity1@@ @A@@ @@ ۰@@ @ @ @@%getBy@@!a @@ ϰ@@	@@ @ Ѱ;@@ @ @ @
  A
`getBy(xs, p)` returns `Some(value)` for the first value in `xs` that satisifies
the predicate function `p`; returns `None` if no element satisifies the function.

## Examples

```rescript
Belt.Array.getBy([1, 4, 3, 2], (x) => mod(x, 2) == 0) == Some(4)
Belt.Array.getBy([15, 13, 11], (x) => mod(x, 2) == 0) == None
```
@@@@@+getIndexByU@@!a @@ İ@@@@ @ ɠࠠ*Has_arity1@@ @A@@ @@ ʰo@@ @@ @ @ @@*getIndexBy@@֠!a @@ @@	@@ @ @@ @@ @ @ @
  P
`getIndexBy(xs, p)` returns `Some(index)` for the first value in `xs` that
satisifies the predicate function `p`; returns `None` if no element satisifies
the function.

## Examples

```rescript
Belt.Array.getIndexBy([1, 4, 3, 2], (x) => mod(x, 2) == 0) == Some(1)
Belt.Array.getIndexBy([15, 13, 11], (x) => mod(x, 2) == 0) == None
```
@@@@@%keepU@@!a @@ @w@@@ @ ࠠ*Has_arity1q@@ @A@@ @@ @@ @ @ @-@$keep@@)!a @@ @@	B@@ @ 9@@ @ @ @H)K	G
`keep(xs, p)` returns a new array that keep all elements satisfy `p`.
@S@@S@@.keepWithIndexU@@O!a @@ @Š@@X@@ r@@ @ @ ࠠ*Has_arity2@@ @A@@ @@ r#@@ @ @ @@-keepWithIndex@@}!a @@ @@	@@@ @@ @ @ @@ @ @ @	
`keepWithIndex(xs, p)` returns a new array that keep all elements satisfy `p`.

## Examples

```rescript
Belt.Array.keepWithIndex([1, 2, 3], (_x, i) => i == 1) == [2]
```
@@@@@(keepMapU@@!a @@ @@b!b @@ @ ࠠ*Has_arity1@@ @A@@ @@ ޠ@@ @ @ @@'keepMap@@נ!a @@ @@	!b @@ @ 	@@ @ @ @	
`keepMap(xs, p)` returns a new array that keep all elements that return a non
None applied `p`.

## Examples

```rescript
Belt.Array.keepMap([1, 2, 3], x =>
  if mod(x, 2) == 0 {
    Some(x)
  } else {
    None
  }
)
== [2]
```
@@@@@1forEachWithIndexU@@!a {@@ w@y@
@@ z@@@ |@ }@ ~ࠠ*Has_arity2y@@ x@A@@ y@@ @@ @ @ @5@0forEachWithIndex@@1!a p@@ n@@4@@ o@(@@ q@ r@ s,@@ t@ u@ v@V7Y
  
`forEachWithIndex(xs, f)` same as `Belt.Array.forEach`, except that `f` is
supplied two arguments: the index starting from 0 and the element from `xs`.

## Examples

```rescript
Belt.Array.forEachWithIndex(["a", "b", "c"], (i, x) => Js.log("Item " ++ Belt.Int.toString(i) ++ " is " ++ x))

/*
  prints:
  Item 0 is a
  Item 1 is b
  Item 2 is cc
*/
let total = ref(0)

Belt.Array.forEachWithIndex([10, 11, 12, 13], (i, x) => total := total.contents + x + i)

total.contents == 0 + 10 + 1 + 11 + 2 + 12 + 3 + 13
```
@a@@a@@-mapWithIndexU@@]!a f@@ b@Ӡ@d@@ e@!b j@ g@ hࠠ*Has_arity2@@ c@A@@ d@@ i@@ k@ l@ m@@,mapWithIndex@@!a [@@ Y@@@@ Z@!b ^@ \@ ]@@ _@ `@ a@	
`mapWithIndex(xs, f)` applies `f` to each element of `xs`. Function `f` takes
two arguments: the index starting from 0 and the element from `xs`.

## Examples

```rescript
Belt.Array.mapWithIndex([1, 2, 3], (i, x) => i + x) == [0 + 1, 1 + 2, 2 + 3]
```
@@@@@*partitionU@@!a T@@ M@/@@@ P@ Qࠠ*Has_arity1)@@ N@A@@ O@@ R٠ @@ Uޠ%@@ S@ V@ W@ X@@)partition@@頰!a H@@ D@@	@@ E@ F@@ I	@@ G@ J@ K@ L@		
  e
`partition(f, a)` split array into tuple of two arrays based on predicate `f`;
first of tuple where predicate cause true, second where predicate cause false

## Examples

```rescript
Belt.Array.partition([1, 2, 3, 4, 5], (x) => mod(x, 2) == 0) == ([2, 4], [1, 3, 5])

Belt.Array.partition([1, 2, 3, 4, 5], (x) => mod(x, 2) != 0) == ([1, 3, 5], [2, 4])
```
@	@@	@@'reduceU@@	*!b <@@ 9@!a @@@@@ =@ >ࠠ*Has_arity2@@ :@A@@ ;@@ ?@ A@ B@ C@	D@&reduce@@	S!b 2@@ 1@!a 5@@@
@ 3@ 4
@ 6@ 7@ 8@	`	A	c
  
`reduce(xs, init, f)` applies `f` to each element of `xs` from beginning to end.
Function `f` has two parameters: the item from the list and an “accumulator”;
which starts with a value of `init`. `reduce` returns the final value of the
accumulator.

## Examples

```rescript
Belt.Array.reduce([2, 3, 4], 1, (a, b) => a + b) == 10

Belt.Array.reduce(["a", "b", "c", "d"], "", (a, b) => a ++ b) == "abcd"
```
@	k@@	k@@.reduceReverseU@@	z!b )@@ &@!a -@䠰@@@ *@ +ࠠ*Has_arity2@@ '@A@@ (@@ ,@ .@ /@ 0@	@-reduceReverse@@	!b @@ @!a "@@@
@  @ !
@ #@ $@ %@			
  
`reduceReverse(xs, init, f)` works like `Belt.Array.reduce` except that
function `f` is applied to each item of `xs` from the last back to the first.

## Examples

```rescript
Belt.Array.reduceReverse(["a", "b", "c", "d"], "", (a, b) => a ++ b) == "dcba"
```
@	@@	@@/reduceReverse2U@@	!a @@ @	Ԡ!b @@ @!c @>@@ @@ @ @ ࠠ*Has_arity38@@ @A@@ @@ @ @ @ @ @	@.reduceReverse2@@	젰!a @@ @
	!b @@ @!c 
@@@@@ @ @ 	@ @ @ @ @
	

  
`reduceReverse2(xs, ys, init, f)` reduces two arrays xs and ys;taking items
starting at `min(length(xs), length(ys))` down to and including zero.

## Examples

```rescript
Belt.Array.reduceReverse2([1, 2, 3], [1, 2], 0, (acc, x, y) => acc + x + y) == 6
```
@
#@@
#@@0reduceWithIndexU@@
!a @@ @!b @@@@
0@@ @ @ @ ࠠ*Has_arity3@@ @A@@ @@ @  @ @ @
Q@/reduceWithIndex@@
M!a @@ @!b @@@@
Z@@ @ @ @ @ @ @ @
r
S
u
  
Applies `f` to each element of `xs` from beginning to end. Function `f` has
three parameters: the item from the array and an “accumulator”, which starts 
with a value of `init` and the index of each element. `reduceWithIndex` returns
the final value of the accumulator.

## Examples

```rescript
Belt.Array.reduceWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16
```
@
}@@
}@@)joinWithU@@
y!a @@ @P&string@@@ @@@@ @ 栰ࠠ*Has_arity1@@ @A@@ @@ 簳@@ @ @ @ @
@(joinWith@@
!a @@ װ@0@@ ذ@@8@@ @ ۰<@@ @ @ @ @
Π

ѐ
  &
`joinWith(xs, sep, toString)`

Concatenates all the elements of `xs` converted to string with `toString`, each
separated by `sep`, the string given as the second argument, into a single string.
If the array has only one element, then that element will be returned without 
using the separator. If the array is empty, the empty string will be returned.

## Examples

```rescript
Belt.Array.joinWith([0, 1], ", ", Js.Int.toString) == "0, 1"
Belt.Array.joinWith([], " ", Js.Int.toString) == ""
Belt.Array.joinWith([1], " ", Js.Int.toString) == "1"
```
@
@@
@@%someU@@
ՠ!a @@ Ͱ@K@	@@ @ Ҡࠠ*Has_arity1E@@ @A@@ @@ Ӱ	@@ @ @ @@$some@@
!a @@ ư@@	
@@ @ ɰ
@@ @ @ @

  5
`some(xs, p)` returns true if at least one of the elements in `xs` satifies `p`;
where `p` is a predicate: a function taking an element and returning a `bool`.

## Examples

```rescript
Belt.Array.some([2, 3, 4], (x) => mod(x, 2) == 1) == true

Belt.Array.some([(-1), (-3), (-5)], (x) => x > 0) == false
```
@'@@'@@&everyU@@#!a @@ @@
@@@ @ ࠠ*Has_arity1@@ @A@@ @@ °
M@@ @ @ @O@%every@@K!a @@ @@	
d@@ @ 
h@@ @ @ @jKm
  
`every(xs, p)` returns `true` if all elements satisfy `p`; where `p` is a
predicate: a function taking an element and returning a `bool`.

## Examples

```rescript
Belt.Array.every([1, 3, 5], (x) => mod(x, 2) == 1) == true

Belt.Array.every([1, (-3), 5], (x) => x > 0) == false
```
@u@@u@@'every2U@@q!a @@ @!b @@ @@@
@@ @ @ ࠠ*Has_arity2@@ @A@@ @@ 
@@ @ @ @ @@&every2@@!a @@ @à!b @@ @@@
@@ @ @ 
@@ @ @ @ @ҠՐ
  
`every2(xs, ys, p)` returns true if `p(xi, yi)` is true for all pairs of
elements up to the shorter length (i.e. `min(length(xs), length(ys))`)

## Examples

```rescript
Belt.Array.every2([1, 2, 3], [0, 1], (a, b) => a > b) == true

Belt.Array.every2([], [1], (x, y) => x > y) == true

Belt.Array.every2([2, 3], [1], (x, y) => x > y) == true

Belt.Array.every2([0, 1], [5, 0], (x, y) => x > y) == false
```
@@@@@&some2U@@٠!a @@ @!b @@ @	Z@@@@ @ @ ࠠ*Has_arity2	V@@ @A@@ @@ @@ @ @ @ @@%some2@@!a @@ @+!b @@ @@@4@@ @ @ 8@@ @ @ @ @:=
  Z
`some2(xs, ys, p)` returns true if `p(xi, yi)` is true for any pair of elements
up to the shorter length (i.e. `min(length(xs), length(ys))`)

## Examples

```rescript
Belt.Array.some2([0, 2], [1, 0, 3], (a, b) => a > b) == true

Belt.Array.some2([], [1], (x, y) => x > y) == false

Belt.Array.some2([2, 3], [1, 4], (x, y) => x > y) == true
```
@E@@E@@$cmpU@@A!a z@@ v@K
@@ w@	@@P@@ {@ |@ }ࠠ*Has_arity2	@@ x@A@@ y@@ ~]@@ @ @ @ @u@#cmp@@q!a n@@ l@{
@@ m@@@|@@ o@ p@ q@@ r@ s@ t@ u@y
  
`cmp(xs, ys, f)` compared by length if `length(xs) != length(ys)`; returning `-1`
if `length(xs) < length(ys)` or 1 if `length(xs) > length(ys)`. Otherwise
compare one by one `f(x, y)`. `f` returns a negative number if `x` is “less than” `y`
zero if `x` is “equal to” `y` a positive number if `x` is “greater than”
`y`. The comparison returns the first non-zero result of `f`; or zero if `f`
returns zero for all `x` and `y`.

## Examples

```rescript
Belt.Array.cmp([1, 3, 5], [1, 4, 2], (a, b) => compare(a, b)) == -1

Belt.Array.cmp([1, 3, 5], [1, 2, 3], (a, b) => compare(a, b)) == 1

Belt.Array.cmp([1, 3, 5], [1, 3, 5], (a, b) => compare(a, b)) == 0
```
@@@@@#eqU@@!a c@@ _@
@@ `@
@@@@ d@ e@ fࠠ*Has_arity2
@@ a@A@@ b@@ g@@ h@ i@ j@ k@@"eq@@Ϡ!a W@@ U@٠
@@ V@@@@@ X@ Y@ Z@@ [@ \@ ]@ ^@
  
`eq(xs, ys)` return `false` if length is not the same otherwise compare items
one by one using `f(xi, yi)`; and return true if all results are true false otherwise

## Examples

```rescript
Belt.Array.eq([1, 2, 3], [(-1), (-2), (-3)], (a, b) => abs(a) == abs(b)) == true
```
@@@@@6truncateToLengthUnsafe@@!a O@@ P@@@ Q@@ R@ S@ T&lengthBA	!            BE&length@@@@@ #
  s
Unsafe `truncateToLengthUnsafe(xs, n)` sets length of array `xs` to `n`. If `n`
is greater than the length of `xs`; the extra elements are set to `Js.Null_undefined.null`.
If `n` is less than zero; raises a `RangeError`.

## Examples

```rescript
let arr = ["ant", "bee", "cat", "dog", "elk"]

Belt.Array.truncateToLengthUnsafe(arr, 3)

arr == ["ant", "bee", "cat"]
```
@+@@+@@%initU@@@@ E@
@*@@ H!a K@ Iࠠ*Has_arity1
@@ F@A@@ G@@ JD@@ L@ M@ N@S@$init@@F@@ >@@N@@ ?!a A@ @_@@ B@ C@ D@n@$push@@j!a :@@ 9@Y@@ ;@ <@ =$pushBA	             BE$push@@@@@@j	A
`arr->push(item)` pushes an element `item` into an array `arr`.
@@@@@@   Z      5   ,*Belt_Array0Bʢ&56("Js0.?<!H"{.Belt_internals0jwn/<ܸ@               @Caml1999T022 %.  */  "    4 *Belt_Array'res.doc6others/belt_Array.resiOCCZSU@
  
Utilities for `Array` functions.

### Note about index syntax

Code like `arr[0]` does *not* compile to JavaScript `arr[0]`. Reason transforms
the `[]` index syntax into a function: `Array.get(arr, 0)`. By default, this
uses the default standard library's `Array.get` function, which may raise an
exception if the index isn't found. If you `open Belt`, it will use the
`Belt.Array.get` function which returns options instead of raising exceptions. 
[See this for more information](../belt.mdx#array-access-runtime-safety).
@@@@  8 @@@@T'promise@  , @ X@A@A@Y@@&_none_A@ A@@@@R*floatarray@  , @@@A@@@@@Q5extension_constructor@A#int@  , @@@A@@@@A	P&string@U)function$@  ,  U T@Bаi)Function$@
@@@@A@YY@@@@A@S'unknown@  , @@аh'Unknown@, V@@@ J/@@A@@@/@@D%float@+E$bool@  , @@аa%false@@@:@аb$true@@@?@@A@@@?@A<F$unit@  , @@аc"()@@@H@@A@@@H@AEG#exn@  , @@AA@@@K@@HH%array@  , R M@A@A@ @@Q@@NI$list@  , X N@Aаd"[]@@@\@аe"::@@@ O@@h@@A@Y@@i@@fL$dict@  , p S@A@A@@n@@kK&result@  , u Rw Q@BаY"OkB
@@|@аZ%ErrorB@@@@A@YY@@@@J&option@  ,  P@Aаf$None@@@@аg$Some@@@@@A@Y@@@@O&lazy_t@  ,  W@A@A@Y@@@@N&bigint@M%int64@`:Undefined_recursive_moduleC\@@@ I@@ @@ a@@A=ocaml.warn_on_literal_pattern@_.Assert_failureC@@ c@@A@^0Division_by_zeroC$@@@AȠ@]+End_of_fileC+@@@AϠ@\)Not_foundC2@@@A֠#@X'FailureC9@5@@Aޠ+@['JsErrorCA@@@A栠3@W0Invalid_argumentCI@E@@A;@V-Match_failureCQ@PLM@ k@@AH @C%bytes@B$char@  , @@@@V@@@@@.Belt_internalsA@@A;@  ( !t@C\W\D\W]@А!a  BN\W_O\W`@@B@  , @A@Aؠ @@  Р @@\\WW]\Wm@@@(@@Aг%arraye\Wdf\Wi@А!a`l\Wkm\Wl@@@c
@@@@d@&length@xhyh@б@г@!thh@А!a     8 @Q@@@Ahh@@@@@  	h@@г`#inthh@@	@@  @@@@  &@@-%array_lengthAA @@@^ooh	@^oog@	e
Return the size of the array

## Examples

```rescript
// Returns 1
Belt.Array.length(["test"])
```
@@@@@@@4$size@k.7k.;@б@г!tk.=k.>@А!a     8 @Sn9@@Ak.@k.A@@@@@  	k.B@@г#intk.Fk.I@@	@@  @@@@  &@@-%array_lengthAAR@@@jk.[@jj-@= See [`Belt.Array.length`]() @@@@@@@3#get@yy@б@г㠐!t&y'y@А!a    8 &&&&&&&&&@Rm8@@A4y5y@@@@@  	;y@@б@г#intEyFy@@	@@ @@г&optionRySy@А!a,'YyZy@@@2@@ .`y@@@@ 
2@@@0@ 5gy@@@jm]]@pom]]px@
  &
If `i <= 0 <= length(arr)` returns `Some(value)` where `value` is the item at index `i`.
If `i` is out of range returns `None`.

## Examples

```rescript
Belt.Array.get(["a", "b", "c"], 0) == Some("a")
Belt.Array.get(["a", "b", "c"], 3) == None
Belt.Array.get(["a", "b", "c"], -1) == None
```
@@@@@@zy@J&getExn@@б@гK!t @А!a   8 @i3@@A"#@@@@@ 	$@@б@гm#int&)@@	@@ @@А!a"/0@@@'@ "@@@ @ %@@@{@Ȱ{~@	^
Raise an exception if `i` is out of range.
Otherwise return the value at index `i` in `arr`.
@@@@@@@:)getUnsafe@ H H@б@г!t H H@А!a '  8 @Yt3@@A H H@@@@@ 	 H@@б@гŠ#int H H@@	@@ !@@А!a" H H@@@'@ $"@@@ @ %% H@@1%array_unsafe_getBAo@@@@ A22  H@&% A22& G@	t
`getUnsafe(arr, i)`

**Unsafe**

no bounds checking; this would cause type error if `i` does not stay within range
@@@@@@@@,getUndefined@9 Q: Q@б@г!tD QE Q@А!a (  8 DDDDDDDDD@_z9@@AR QS Q@@@@@ *	Y Q@@б@г##intc Qd Q@@	@@ .@@г@"JsA)undefined t Qu Q@А!a0+{ Q| Q@@@6@@ 2 Q@@@ @ 6#@@@4@ 9 Q@@1%array_unsafe_getBA@@@@ J Q@ J P@	
`getUndefined(arr, i)`

It does the samething in the runtime as [`getUnsafe`]();
it is _type safe_ since the return type still track whether it is
in range or not
@@@@@@@T#set@ W	|	 W	|	@б@гs!t W	|	 W	|	@А!a   8 @s9@@A W	|	 W	|	@@@@@ 	 W	|	@@б@г#int W	|	 W	|	@@	@@ @@б@А!a$ W	|	 W	|	@@г$bool W	|	 W	|	@@	@@ .@@@6@ 1 W	|		@@@@ 5"@@@3@ 8 W	|	@@@ S@ S V	y	{@	
`set(arr, n, x)` modifies `arr` in place; it replaces the nth element of `arr`
with `x`. Returning `false` means not updated due to out of range.
@@@@@@ W	|	|#@M&setExn@ \		 \		@б@гޠ!t! \		" \		@А!a   8 !!!!!!!!!@l3@@A/ \		0 \		@@@@@ 	6 \		@@б@г #int@ \		A \		@@	@@ @@б@А!a$L \		M \	
 @@гߠ$unitU \	
V \	
	@@	@@ .@@@6@ 1^ \			@@@@ 5"@@@3@ 8e \		@@@h Y		@nm Y		n [		@	@
`setExn(arr, i, x)` raise an exception if `i` is out of range.
@@@@@@x \		#@M)setUnsafe@ ^

 ^

@б@гI!t ^

  ^

!@А!a   8 @l3@@A ^

# ^

$@@@@@ 	 ^

%@@б@гk#int ^

' ^

*@@	@@ @@б@А!a$ ^

- ^

.@@гJ$unit ^

3 ^

7@@	@@ .@@@6@ 1 ^

,	@@@@ 5"@@@3@ 8 ^

@@1%array_unsafe_setCA(@@@@@ ^

 ^

M@@@@@F.shuffleInPlace@ c

 c

@б@г!t c

 c

@А!a   8 @e,@@A c

 c

@@@@@ 	 c

@@г$unit c

 c

@@	@@ @@@@ &@@@ `
O
O@ `
O
O b

@	=
`shuffleInPlace(arr)` randomly re-orders the items in `arr`
@@@@@@( c

@.'shuffle@1 f2 f@б@г!t< f= f@А!a   8 <<<<<<<<<@Mh3@@AJ fK f@@@@@ 	Q f@@г!tY fZ f@А!a` fa f@@@#@@ g f@@@@ #/@@@m e

@sr e

s e
@	G Returns a fresh array with items in original array randomly shuffled. @@@@@@} f@7.reverseInPlace@ u u@б@гN!t u u@А!a   8 @Vq3@@A u u@@@@@ 	 u@@г8$unit u u@@	@@ @@@@ &@@@ h@ h t@	
`reverseInPlace(arr)` reverses items in `arr` in place.

## Examples

```rescript
let arr = [10, 11, 12, 13, 14]

let () = Belt.Array.reverseInPlace(arr)

arr == [14, 13, 12, 11, 10]
```
@@@@@@ u@.'reverse@  @б@г!t  @А!a   8 @Mh3@@A  @@@@@ 	 @@г!t  @А!a  @@@#@@  @@@@ #/@@@ w@ w @	
`reverse(arr)` returns a fresh array with items in arr in reverse order.

## Examples

```rescript
Belt.Array.reverse([10, 11, 12, 13, 14]) == [14, 13, 12, 11, 10]
```
@@@@@@ @71makeUninitialized@' 
( 
$@б@г#int2 
&3 
)@@	@@   8 ,,,,,,,,,@Pk-@@A@@г%arrayA 
-B 
2@г@"JsA)undefined O 
3P 
?@А!a #[ 
A\ 
B@@@@@ 	*b 
C@@@)	@@ 0'h 
D@@@7@ 4:@@%ArrayAA	"            A@%Array@@@@@@s t 
N@zy z 	@
  /
`makeUninitialized(n)` creates an array of length `n` filled with the undefined
value. You must specify the type of data that will eventually fill the array.

## Examples

```rescript
let arr: array<Js.undefined<string>> = Belt.Array.makeUninitialized(5)

Belt.Array.getExn(arr, 0) == Js.undefined
```
@@@@@@@O7makeUninitializedUnsafe@ ;D ;[@б@гY#int ;] ;`@@	@@   8 @h}4@@A@@гe!t ;d ;e@А!a   ;g ;h@@@@@  ;i@@@#@  &@@%ArrayAA	"            A@%Array@@@@@@ PP ;s@Ͱ UU 8:@	
**Unsafe**

## Examples

```rescript
let arr = Belt.Array.makeUninitializedUnsafe(5)

Js.log(Belt.Array.getExn(arr, 0)) // undefined

Belt.Array.setExn(arr, 0, "example")

Js.log(Belt.Array.getExn(arr, 0) == "example")
```
@@@@@@@;$make@  @б@г#int  @@	@@ !  8 @Ti4@@A@@б@А!a -$   @@гŠ!t  	 @А!a  @@@@@ &$ @@@ @ *( @@@/@ +, 	@@@! uu@'& uu' @	n
`make(n, e)` return an array of size `n` filled with value `e`.
Returns an empty array when `n` is negative.
@@@@@@1 @A%range@: ; @б@г#intE F @@	@@ .  8 ?????????@Zo-@@A@@б@г#intV W @@	@@ 1@@г᠐%arrayc d @г-#intm n @@	@@ 4(@@@@@ 8-x @@@#@ <1&@@@7@ =4 @@@ @  @	
`range(start, finish)` create an inclusive array.

## Examples

```rescript
Belt.Array.range(0, 3) == [0, 1, 2, 3]

Belt.Array.range(3, 0) == []

Belt.Array.range(3, 3) == [3]
```
@@@@@@ @I'rangeBy@  @б@гf#int  @@	@@ >  8 @bw-@@A@@б@гw#int  @@	@@ A@@б$stepг#int  @@	@@ D"@/res.namedArgLoc  @@@г[%array  @г#int  @@	@@ GA@@@@@ KF  @@6+@ OJ @@@@@ PNC@@@T@ QQ @@@  @  @
  
`rangeBy(start, finish, ~step)` returns empty array when step is 0 or negative.
It also return an empty array when `start > finish`.

## Examples

```rescript
Belt.Array.rangeBy(0, 10, ~step=3) == [0, 3, 6, 9]

Belt.Array.rangeBy(0, 12, ~step=3) == [0, 3, 6, 9, 12]

Belt.Array.rangeBy(33, 0, ~step=1) == []

Belt.Array.rangeBy(33, 0, ~step=-1) == []

Belt.Array.rangeBy(3, 12, ~step=-1) == []

Belt.Array.rangeBy(3, 3, ~step=0) == []

Belt.Array.rangeBy(3, 3, ~step=1) == [3]
```
@@@@@@ @f'makeByU@  @б@г䠐#int$ % @@	@@ R  8 @-@@A@@б@г)function$5 6 "@б@г#intA B @@	@@ U@@А!a lX&P !@@@	@ Y*@з*Has_arity1&@A@@@@ࠠ@@@ [@A@@ \8-@@3@@ _=g 2@@г,!to 'p (@А!a+Lv *w +@@@1@@ eS} ,@@@@ iW@@@]@ jZ @@@ @@@@@`&makeBy@ =A =G@б@г\#int =J =M@@	@@ m  8 @y@@A@@б@б@гo#int =O =R@@	@@ p@@А!a }s =W =X@@@
@ t!@@г!t =] =^@А!a/ =` =a@@@@@ v6 =b@@@@ z:-@@@@@ {= =I@@@ --@ -- :<@
  

`makeBy(n, f)` return an empty array when n is negative return an array of size
n populated by `f(i)` start from `0` to `n - 1`.

## Examples

```rescript
Belt.Array.makeBy(5, (i) => i) == [0, 1, 2, 3, 4]

Belt.Array.makeBy(5, (i) => i * i) == [0, 1, 4, 9, 16]
```
@@@@@@ ==@R1makeByAndShuffleU@ dh dy@б@гƠ#int	 d|	 d@@	@@ ~  8 	 	 	 	 	 	 	 	 	 @k-@@A@@б@гҠ	 d	 d@б@г᠐#int	! d	" d@@	@@ @@А!a $	0 d@@@	@ (@з*Has_arity1&@A@@@@ࠠ@@ @A@@ 5,@@0
@@ :	F d1@@г!t	N d	O d@А!a*I	U d	V d@@@0@@ P	\ d@@@@ T@@@Z@ W	c d{@@@	f dd@@@@@] 0makeByAndShuffle@	p 	q @б@г	;#int	{ 	| @@	@@   8 	u	u	u	u	u	u	u	u	u@v@@A@@б@б@г	N#int	 	 @@	@@ @@А!a  	 	 @@@
@ !@@гf!t	 	 @А!a/	 	 @@@@@ 6	 @@@@ :-@@@@@ =	 @@@	 @	ǰ	 	 @	'
Equivalent to `shuffle(makeBy(n, f))`
@@@@@@	 @R#zip@	 	 @б@г!t	 	 @А!a   8 									@q3@@A	 	 @@@@@ 		 @@б@г	%array
 
 @А!b 
 
 @@@@@ &
 @@г	%array
 
  @ВА!a=8
) 
* @@А!b%?
0 
1 @@@J,@ F
7 
8 @@@!
@@ M
> @@@/@ Q>@@@O@ T
E @@@
H @
N
M 
N @	
`zip(a, b)` create an array of pairs from corresponding elements of a and b.
Stop with the shorter array.

## Examples

```rescript
Belt.Array.zip([1, 2], [3, 4, 5]) == [(1, 3), (2, 4)]
```
@@@@@@
X @i&zipByU@
a 
b @б@г	)!t
l 
m @А!a   8 
l
l
l
l
l
l
l
l
l@3@@A
z 
{ @@@@@ 	
 @@б@г
	%array
  
 @А!b 
 
 @@@@@ &
 	@@б@г
cs
 
 @б@А!a<7
 
 @@б@А!b%?
 
 @@А!c J
 @@@4	@ N
  @@@W@ R$@з*Has_arity2+@A@@@@ࠠv@@ @A@@ _1@@5
@@ d
 6@@г
b%array
  
 %@А!c.s
 '
 (@@@4@@ z
 )@@@@ ~@@@_@ n@@@@ 
 @@@
 @@@@@%zipBy@	 BF
 BK@б@г	Ѡ!t BN BO@А!a   8 @$@@A" BQ# BR@@@@@ 	) BS@@б@г
%array3 BU4 BZ@А!b ? B\@ B]@@@@@ &F B^@@б@б@А!a4/O BbP Bc@@б@А!b7W BfX Bg@@А!c Bb Bmc Bn@@@-
@ Gg Be@@@P@ Kk B`	@@г
%arrays Bst Bx@А!cZz Bz{ B{@@@#@@ a B|@@@@ e@@@F@ hU@@@f@ k BM@@@ **@ ** ?A@
  
`zipBy(xs, ys, f)` create an array by applying `f` to corresponding elements of
`xs` and `ys`. Stops with shorter array.

Equivalent to `map(zip(xs, ys), ((a, b)) => f(a, b))`

## Examples

```rescript
Belt.Array.zipBy([1, 2, 3], [4, 5], (a, b) => 2 * a + b) == [6, 9]
```
@@@@@@ BB@%unzip@@б@г0%array@ВА!a   8 @6@@A@@А!b @@@@ @@@-
@@ 
+@@Вг
!t@А!a3.@@@9@@ 5@@г}%array  @А!b<E@@@B@@ L	@@@ 
@ R
@@@?	@ Wf@@@ ~~@  ~~ @
  V
`unzip(a)` takes an array of pairs and creates a pair of arrays. The first array
contains all the first items of the pairs; the second array contains all the
second items.

## Examples

```rescript
Belt.Array.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])

Belt.Array.unzip([(1, 2), (3, 4), (5, 6), (7, 8)]) == ([1, 3, 5, 7], [2, 4, 6, 8])
```
@@@@@@*@k&concat@3=A4=G@б@г
!t>=J?=K@А!a 1  8 >>>>>>>>>@3@@AL=MM=N@@@@@  	S=O@@б@г!t]=Q^=R@А!ad=Te=U@@@%@@ %!k=V@@г0!ts=[t=\@А!a50z=^{=_@@@;@@ *7=`@@@@ .;(@@@9@ />=I@@@@:<@
  +
`concat(xs, ys)` returns a fresh array containing the concatenation of the arrays
`v1` and `v2`, so even if `v1` or `v2` is empty; it can not be shared.

## Examples

```rescript
Belt.Array.concat([1, 2, 3], [4, 5]) == [1, 2, 3, 4, 5]

Belt.Array.concat([], ["a", "b", "c"]) == ["a", "b", "c"]
```
@@@@@@==@S*concatMany@&48&4B@б@г-%array&4D&4I@гv!t&4J&4K@А!a D2  8 @|=@@A&4M&4N@@@@@ 4	&4O@@@'	@@ 9%&4P@@г!t&4T&4U@А!a#&4W&4X@@@)@@ >%&4Y@@@@ B)?@@@bb@bb%13@	
`concatMany(xss)` returns a fresh array as the concatenation of `xss` (an array of arrays)

## Examples

```rescript
Belt.Array.concatMany([[1, 2, 3], [4, 5, 6], [7, 8]]) == [1, 2, 3, 4, 5, 6, 7, 8]
```
@@@@@@ &44@=%slice@	; $
; )@б@гѠ!t; ,; -@А!a ZE  8 @\3@@A"; /#; 0@@@@@ G	); 1@@б&offsetг#int5; <6; ?@@	@@ K@m?; 4@; :@@@б#lenг#intM; GN; J@@	@@ N3@W; BX; E@@@г!ta; Ob; P@А!aMHh; Ri; S@@@S@@ ROo; T@@.#@ VSs; A@@J?@ WWw; 3	@@@V@ X[{; +@@@~([[@([[:@
  
`slice(xs, offset, len)` creates a new array with the len elements of `xs`
starting at `offset` for `offset` can be negative;and is evaluated as
`length(xs) - offset(slice, xs) - 1(1)` means get the last element as a
singleton array `slice(xs, ~-len, len)` will return a copy of the array if the
array does not have enough data; `slice` extracts through the end of sequence.

if `len` is negative; returns the empty array.

## Examples

```rescript
Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=2, ~len=3) == [12, 13, 14]

Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=-4, ~len=3) == [13, 14, 15]

Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=4, ~len=9) == [14, 15, 16]
```
@@@@@@;   @p*sliceToEnd@N 1 5N 1 ?@б@г_!tN 1 BN 1 C@А!a l[  8 @3@@AN 1 EN 1 F@@@@@ ]	N 1 G@@б@г#intN 1 IN 1 L@@	@@ a@@г!tN 1 QN 1 R@А!a,'N 1 TN 1 U@@@2@@ e.N 1 V@@@@ i2@@@0@ j5N 1 A@@@=VV@=VVM . 0@
  
`sliceToEnd(xs, offset)` creates a new array with the elements of `xs` starting
at `offset`

`offset` can be negative; and is evaluated as `length(xs) - offset(sliceToEnd, xs) - 1`
means get the last element as a singleton array

`sliceToEnd(xs, 0)` will return a copy of the array

## Examples

```rescript
Belt.Array.sliceToEnd([10, 11, 12, 13, 14, 15, 16], 2) == [12, 13, 14, 15, 16]

Belt.Array.sliceToEnd([10, 11, 12, 13, 14, 15, 16], -4) == [13, 14, 15, 16]
```
@@@@@@N 1 1@J	$copy@U   U  @б@гǠ!t
U  U  @А!a z	m  8 








@i3@@AU  U  @@@@@ o	U  @@г䠐!t'U  (U  @А!a.U  /U  @@@#@@ t5U  @@@@ x#9U  @@%sliceAA	+      
      AA@A@@%slice@@@@@AP X XBU  @HGQ ^ ^HT  @	^
`copy(a)` returns a copy of `a`; that is; a fresh array containing the same
elements as `a`.
@@@@@@@?
$fill@\k##]k##	@б@г$!tgk##hk##@А!a 
{  8 ggggggggg@^y:@@Auk##vk##@@@@@ }	|k##@@б&offsetгH#intk##k##@@	@@ @k##k##@@@б#lenг`#intk##'k##*@@	@@ 3@ذk##"k##%@@@б@А!aE@k##-k##.@@гF$unitk##3k##7@@	@@ O@@@W@ Rk##,	@@1&@ Vk##!@@MB@ Zk##@@@Y@ ^k##@@@W  @ڰW  j"# @
  
`fill(arr, ~offset, ~len, x)` modifies `arr` in place, storing `x` in elements
number `offset` to `offset + len - 1`. `offset` can be negative; and is evaluated
as `length(arr - offset)`.

`fill(arr, ~offset=-1, ~len=1)` means fill the last element, if the array does not have enough data; `fill` will ignore it

## Examples

```rescript
let arr = Belt.Array.makeBy(5, (i) => i)

Belt.Array.fill(arr, ~offset=2, ~len=2, 9)

arr == [0, 1, 9, 9, 4]

Belt.Array.fill(arr, ~offset=7, ~len=2, 8)

arr == [0, 1, 9, 9, 4]
@@@@@@k##(@s$blit@&&&&@б#srcг!t&&&&@А!a   8 @5@@A&&	&&@@@@@ 	&&@B&&&&@@@б)srcOffsetг⠐#int"&&#&&@@	@@ "@Z,&&-&&@@@б#dstг!t:&&;&&@А!a@;A&&B&' @@@F@@ BH&'@{M&&N&&@@@б)dstOffsetг#int[&'\&'@@	@@ [@e&'f&'@@@б#lenг3#ints&'t&'@@	@@ s@}&'~&'@@@г$unit&'"&'&@@	@@ @@%@ &'	@@A6@ &'@@fT@ &&@@w@ &&@@@ &&@@@m#9#9@m#9#9&&@
  
`blit(~src=v1, ~srcOffset=o1, ~dst=v2, ~dstOffset=o2, ~len)` copies `len` elements
from array `v1`;starting at element number `o1`;to array `v2`, starting at element
number `o2`. It works correctly even if `v1` and `v2` are the same array and the
source and destination chunks overlap.

`offset` can be negative; `-1` means `len - 1`; if `len + offset` is still negative;it will be set as 0

For each of the examples;presume that `v1 == [10, 11, 12, 13, 14, 15, 16, 17]` and `v2 == [20, 21, 22, 23, 24, 25, 26, 27]`. The result shown is the content of the destination array.

## Examples

```rescript
let v1 = [10, 11, 12, 13, 14, 15, 16, 17]
let v2 = [20, 21, 22, 23, 24, 25, 26, 27]

Belt.Array.blit(~src=v1, ~srcOffset=4, ~dst=v2, ~dstOffset=2, ~len=3)
v2 == [20, 21, 14, 15, 16, 25, 26, 27]

Belt.Array.blit(~src=v1, ~srcOffset=4, ~dst=v1, ~dstOffset=2, ~len=3)
v1 == [10, 11, 14, 15, 16, 15, 16, 17]
```
@@@@@@&&,@*blitUnsafe@'T'X'T'b@б#srcг!t'T'k'T'l@А!a   8 @5@@A'T'n'T'o@@@@@ 	'T'p@'T'f'T'i@@@б)srcOffsetг#int'T'~'T'@@	@@ "@)'T's'T'|@@@б#dstгƠ!t	'T'
'T'@А!a@;'T''T'@@@F@@ B'T'@J'T''T'@@@б)dstOffsetгꠐ#int*'T'+'T'@@	@@ [@b4'T'5'T'@@@б#lenг#intB'T'C'T'@@	@@ s@zL'T'M'T'@@@гࠐ$unitV'T'W'T'@@	@@ @@%@ _'T'	@@A6@ c'T'@@fT@ g'T'@@w@ k'T'r@@@ o'T'd@@@r'('(@xw'('(x'Q'S@	&
Unsafe blit without bounds checking.
@@@@@@'T'T,@(forEachU@''''@б@гS!t''''@А!a   8 @3@@A''''@@@@@ 	''@@б@гp''''@б@А!a''''@@гO$unit''@@@@ (@@@0@ +@з*Has_arity1!@A@@@@ࠠy@@ @A@@ 8'@@+
@@ ='',@@гq$unit''''@@	@@ K@@@@ N@@@L@ Q''@@@''@@@@@W'forEach@ ))))@б@гȠ!t))))@А!a   8 @v$@@A))))@@@@@ 	 ))@@б@б@А!a)))*))@@г$unit2))3))@@	@@ !@@@)@ $;))	@@г͠$unitC))D))@@	@@ 2@@@@ 5@@@3@ 8O))@@@R''@XW''X))@
  
`forEach(xs, f)`

Call `f` on each element of `xs` from the beginning to end. `f` returns `unit`
so no new array is created. Use `forEach` when you are primarily concerned with
repetitively creating side effects.

## Examples

```rescript
Belt.Array.forEach(["a", "b", "c"], x => Js.log("Item: " ++ x))

/*
  prints:
  Item: a
  Item: b
  Item: c
*/
let total = ref(0)

Belt.Array.forEach([1, 2, 3, 4], x => total := total.contents + x)

total.contents == 1 + 2 + 3 + 4
```
@@@@@@b))@M$mapU@k))l))@б@г3!tv))w))@А!a   8 vvvvvvvvv@l3@@A))))@@@@@ 	))@@б@гP	`)*)*@б@А!a)*)*@@А!b %)*@@@.	@ )@з*Has_arity1@A@@@@ࠠ	W@@ @A@@ 6%@@)
@@ ;)* *@@гC%array)*)*@А!b*J)*)*@@@0@@ Q)*@@@@ U@@@S@ X))@@@))@@@@@^#map@****@б@г!t****@А!a %  8 @}$@@A ****@@@@@ 	**@@б@б@А!a****@@А!b '****@@@'
@ " **@@г%array(**)**@А!b1/**0**@@@@@ 86**@@@@ "<@@@:@ #?=**@@@@**@FE**F**@	
`map(xs, f)` returns a new array by calling `f` for each element of `xs` from
the beginning to end.

## Examples

```rescript
Belt.Array.map([1, 2], (x) => x + 1) == [3, 4]
```
@@@@@@P**@T(flatMapU@Y*+ Z*+@б@г!!td*+e*+@А!a G(  8 ddddddddd@s3@@Ar*+s*+@@@@@ *	y*+@@б@г>
N*+*+%@б@А!a*+*+@@г%array*+*+!@А!b I./*+#*+$@@@@@ 06$@@@>@ 49(@з*Has_arity1/@A@@@@ࠠ
U@@ 6@A@@ 7F5@@9
@@ :K*+:@@гA%array*+**+/@А!b0Z*+1*+2@@@6@@ @a*+3@@@@ De@@@c@ Eh*+
@@@**@@@@@n'flatMap@,",&,",-@б@г!t,",0,",1@А!a _J  8 @$@@A,",3,",4@@@@@ L	,",5@@б@б@А!a,",8,",9@@г%array,",=,",B@А!b aP'#,",D$,",E@@@@@ R.*,",F@@@7@ V2.,",7@@г%array6,",K7,",P@А!bA=,",R>,",S@@@%@@ XHD,",T@@@@ \L@@@J@ ]OK,",/@@@N+4+4@TS+4+4T,,!@	
`flatMap(xs, f)` returns a new array by calling `f` for each element of `xs` from
the beginning to end, concatenating the results.

## Examples

```rescript
Belt.Array.flatMap([1, 2], x => [x + 10, x + 20]) == [11, 21, 12, 22]
```
@@@@@@^,","@d&getByU@g,V,Zh,V,`@б@г/!tr,V,cs,V,d@А!a ~b  8 rrrrrrrrr@3@@A,V,f,V,g@@@@@ d	,V,h@@б@гL\,V,k,V,x@б@А!a,V,n,V,o@@г9$bool,V,t@@@@ h(@@@0@ k+@з*Has_arity1!@A@@@@ࠠU@@ m@A@@ n8'@@+
@@ q=,V,j,@@г&option,V,},V,@А!aQL,V,,V,@@@W@@ wS,V,@@@@ {W@@@U@ |Z,V,b@@@,V,V@@@@@`%getBy@----@б@г!t----@А!a   8 @$@@A----@@@@@ 	--@@б@б@А!a----@@г$bool----@@	@@ !@@@)@ $ --	@@гm&option(--)--@А!a83/--0--@@@>@@ :6--@@@@ >@@@<@ A=--@@@@,,@FE,,F--@
  A
`getBy(xs, p)` returns `Some(value)` for the first value in `xs` that satisifies
the predicate function `p`; returns `None` if no element satisifies the function.

## Examples

```rescript
Belt.Array.getBy([1, 4, 3, 2], (x) => mod(x, 2) == 0) == Some(4)
Belt.Array.getBy([15, 13, 11], (x) => mod(x, 2) == 0) == None
```
@@@@@@P--@V+getIndexByU@Y-.Z-.@б@г!!td-.e-.@А!a   8 ddddddddd@u3@@Ar-.s-.@@@@@ 	y-.@@б@г>N-.-.$@б@А!a-.-.@@г+$bool-. @@@@ (@@@0@ +@з*Has_arity1!@A@@@@ࠠG@@ @A@@ 8'@@+
@@ =-.,@@г&option-.)-./@г#int-.0-.3@@	@@ U@@@@@ Z-.4@@@&@ ^!@@@\@ a-.@@@--@@@@@g*getIndexBy@////@б@г!t////@А!a   8 @$@@A////@@@@@ 	//@@б@б@А!a////@@г$bool////@@	@@ !@@@)@ $//	@@гf&option!//"//@г렐#int+//,//@@	@@ <@@@@@ A6//@@@#@ E!@@@C@ H=//@@@@.5.5@FE.5.5F//@
  P
`getIndexBy(xs, p)` returns `Some(index)` for the first value in `xs` that
satisifies the predicate function `p`; returns `None` if no element satisifies
the function.

## Examples

```rescript
Belt.Array.getIndexBy([1, 4, 3, 2], (x) => mod(x, 2) == 0) == Some(1)
Belt.Array.getIndexBy([15, 13, 11], (x) => mod(x, 2) == 0) == None
```
@@@@@@P//@]%keepU@Y//Z//@б@г!!td//e//@А!a   8 ddddddddd@|3@@Ar//s//@@@@@ 	y//@@б@г>N////@б@А!a////@@г+$bool//@@@@ (@@@0@ +@з*Has_arity1!@A@@@@ࠠG@@ @A@@ 8'@@+
@@ =//,@@гr!t////@А!aQL////@@@W@@ S//@@@@ W@@@U@ Z//@@@//@@@@@`$keep@080<080@@б@г!t080C080D@А!a   8 @$@@A080F080G@@@@@ 	080H@@б@б@А!a 080K080L@@г$bool	080P
080T@@	@@ !@@@)@ $080J	@@гנ!t080Y080Z@А!a83!080\"080]@@@>@@ :(080^@@@@ >@@@<@ A/080B@@@2//@87//80507@	G
`keep(xs, p)` returns a new array that keep all elements satisfy `p`.
@@@@@@B0808@V.keepWithIndexU@K0`0dL0`0r@б@г!tV0`0uW0`0v@А!a   8 VVVVVVVVV@u3@@Ad0`0xe0`0y@@@@@ 	k0`0z@@б@г0@s0`0}t0`0@б@А!a|0`0}0`0@@б@гG#int0`00`0@@	@@ +@@г,$bool0`0!@@@@ 7%@@@@ :(@@@B@ =,@з*Has_arity23@A@@@@ࠠK@@ @A@@ J9@@=
@@ O0`0|>@@гv!t0`00`0@А!ac^0`00`0@@@i@@ e0`0@@@@ i@@@g@ l0`0t@@@0`0`@@@@@r-keepWithIndex@1L1P1L1]@б@г!t1L1`1L1a@А!a /  8 @$@@A1L1c1L1d@@@@@ 	1L1e@@б@б@А!a1L1i1L1j@@б@гϠ#int1L1l1L1o@@	@@ #@@г$bool1L1t1L1x@@	@@ "0@@@@ %3@@@;@ &6(1L1g@@г!t01L1}11L1~@А!aJE71L181L1@@@P@@ (L>1L1@@@@ ,P@@@N@ -SE1L1_@@@H00@NM00N1I1K@	
`keepWithIndex(xs, p)` returns a new array that keep all elements satisfy `p`.

## Examples

```rescript
Belt.Array.keepWithIndex([1, 2, 3], (_x, i) => i == 1) == [2]
```
@@@@@@X1L1L@h(keepMapU@a11b11@б@г)!tl11m11@А!a O0  8 lllllllll@3@@Az11{11@@@@@ 2	11@@б@гFV1111@б@А!a1111@@гࠐ&option1111@А!b Q6/1111@@@@@ 86$@@@>@ <9(@з*Has_arity1/@A@@@@ࠠ]@@ >@A@@ ?F5@@9
@@ BK11:@@гI%array1111@А!b0Z1111@@@6@@ Ha11@@@@ Le@@@c@ Mh11@@@11@@@@@n'keepMap@2222@б@г!t2222@А!a gR  8 @$@@A2222@@@@@ T	22@@б@б@А!a2222@@гd&option22 22@А!b iX'+22,22@@@@@ Z.222@@@7@ ^2622@@г%array>22?22@А!bAE22F22@@@%@@ `HL22@@@@ dL@@@J@ eOS22@@@V11@\[11\22@	
`keepMap(xs, p)` returns a new array that keep all elements that return a non
None applied `p`.

## Examples

```rescript
Belt.Array.keepMap([1, 2, 3], x =>
  if mod(x, 2) == 0 {
    Some(x)
  } else {
    None
  }
)
== [2]
```
@@@@@@f22@d1forEachWithIndexU@o22p22@б@г7!tz22{22@А!a j  8 zzzzzzzzz@3@@A2222@@@@@ l	22@@б@гTd2223@б@гc#int2223@@	@@ p#@@б@А!a.)2323@@гB$unit23!@@@@ s7%@@@?@ v:23)@@@@ w>-@з*Has_arity24@A@@@@ࠠp@@ y@A@@ zK:@@>
@@ }P22?@@гh$unit2323@@	@@ ^@@@@ a@@@_@ d22@@@22@@@@@j0forEachWithIndex@5#5'5#57@б@г!t5#5:5#5;@А!a   8 @$@@A5#5=5#5>@@@@@ 	5#5?@@б@б@г㠐#int#5#5B$5#5E@@	@@ @@б@А!a&!/5#5H05#5I@@г $unit85#5N95#5R@@	@@ 0@@@8@ 3A5#5G	@@@@ 7E5#5A@@гנ$unitM5#5WN5#5[@@	@@ E@@@@ H@@@F@ KY5#59@@@\33@ba33b5 5"@
  
`forEachWithIndex(xs, f)` same as `Belt.Array.forEach`, except that `f` is
supplied two arguments: the index starting from 0 and the element from `xs`.

## Examples

```rescript
Belt.Array.forEachWithIndex(["a", "b", "c"], (i, x) => Js.log("Item " ++ Belt.Int.toString(i) ++ " is " ++ x))

/*
  prints:
  Item 0 is a
  Item 1 is b
  Item 2 is cc
*/
let total = ref(0)

Belt.Array.forEachWithIndex([10, 11, 12, 13], (i, x) => total := total.contents + x + i)

total.contents == 0 + 10 + 1 + 11 + 2 + 12 + 3 + 13
```
@@@@@@l5#5#@`-mapWithIndexU@u5]5av5]5n@б@г=!t5]5q5]5r@А!a   8 @3@@A5]5t5]5u@@@@@ 	5]5v@@б@гZj5]5y5]5@б@гi#int5]5{5]5~@@	@@ #@@б@А!a.)5]55]5@@А!b 45]5#@@@=	@ 85]5'@@@@ <+@з*Has_arity22@A@@@@ࠠt@@ @A@@ I8@@<
@@ N5]5x=@@г`%array5]55]5@А!b.]5]55]5@@@4@@ d5]5@@@@ h@@@f@ k5]5p@@@5]5]@@@@@q ,mapWithIndex@(66(66@б@г̠!t(66(66@А!a    8 @$@@A(66(66@@@@@ 	$(66@@б@б@г#int0(661(66@@	@@ @@б@А!a&!<(66=(66@@А!b  ,G(66H(66@@@6
@ 1L(66@@@@ 5P(66	@@г֠%arrayX(66Y(66@А!bD_(66`(66@@@#@@ Kf(66@@@@ O@@@M@ Rm(66@@@p55@vu55v'66@	
`mapWithIndex(xs, f)` applies `f` to each element of `xs`. Function `f` takes
two arguments: the index starting from 0 and the element from `xs`.

## Examples

```rescript
Belt.Array.mapWithIndex([1, 2, 3], (i, x) => i + x) == [0 + 1, 1 + 2, 2 + 3]
```
@@@@@@(66@g!*partitionU@*66*66@б@гQ!t*66*66@А!a !  8 @3@@A*66*66@@@@@ 	*66@@б@гn~*66*66@б@А!a*66*66@@г[$bool*66@@@@ (@@@0@ +@з*Has_arity1!@A@@@@ࠠw@@ @A@@ 8'@@+
@@ =*66,@@Вг!t*67*67@А!aTO*67*67@@@Z@@ V*67@@г!t*67 *67	@А!akf*67*67@@@q@@ m*67@@@ 
@ s*67 *67@@@@	@ x;@@@v@ {*66@@@*66@@@@@")partition@(78z8~)78z8@б@г!t378z8478z8@А!a "  8 333333333@$@@AA78z8B78z8@@@@@ 	H78z8@@б@б@А!aQ78z8R78z8@@г$boolZ78z8[78z8@@	@@ !@@@)@ $c78z8	@@Вг+!tn78z8o78z8@А!a;6u78z8v78z8@@@A@@ =|78z8@@гB!t78z878z8@А!aRM78z878z8@@@X@@ 	T78z8@@@ 
@ Z78z878z8@@@=	@ _;@@@]@ b78z8@@@+77@+7768w8y@
  e
`partition(f, a)` split array into tuple of two arrays based on predicate `f`;
first of tuple where predicate cause true, second where predicate cause false

## Examples

```rescript
Belt.Array.partition([1, 2, 3, 4, 5], (x) => mod(x, 2) == 0) == ([2, 4], [1, 3, 5])

Belt.Array.partition([1, 2, 3, 4, 5], (x) => mod(x, 2) != 0) == ([1, 3, 5], [2, 4])
```
@@@@@@78z8z@w#'reduceU@988988@б@гF%array988988@А!b +#  8 @3@@A988988@@@@@ 	988@@б@А!a )#988988@@б@г988988@б@А!a'988988@@б@А!b4/988988@@А!a%5	988@@@>)@ 9988@@@-@ =@з*Has_arity2&@A@@@@ࠠ@@ @A@@ J,@@0
@@  O#9881@@А!aDT(988)988@@@I@ %Y
@@@L@ &\0988@@@[@ '`4988@@@7988@@@@@f$&reduce@AH::BH::@б@гʠ%arrayLH::MH::@А!b ;$,  8 LLLLLLLLL@$@@AZH::[H::@@@@@ .	aH::@@б@А!a 9$2mH::nH::@@б@б@А!awH::xH::@@б@А!b,'H::H::@@А!a-H::H::@@@7"@ 32H::@@@&@ 46H::	@@А!a+;H::H::@@@0@ 5@
@@@3@ 6CH::@@@B@ 7GH::@@@:88@:88G::@
  
`reduce(xs, init, f)` applies `f` to each element of `xs` from beginning to end.
Function `f` has two parameters: the item from the list and an “accumulator”;
which starts with a value of `init`. `reduce` returns the final value of the
accumulator.

## Examples

```rescript
Belt.Array.reduce([2, 3, 4], 1, (a, b) => a + b) == 10

Belt.Array.reduce(["a", "b", "c", "d"], "", (a, b) => a ++ b) == "abcd"
```
@@@@@@H::@\%.reduceReverseU@J::J::@б@гD%arrayJ::J::@А!b U%<  8 @{3@@AJ::J::@@@@@ >	J::@@б@А!a S%BJ::J::@@б@гJ::J::@б@А!a'J::J::@@б@А!b4/J::J::@@А!a%5J::@@@>)@ C9J::@@@-@ D=@з*Has_arity2&@A@@@@ࠠ@@ F@A@@ GJ,@@0
@@ JO!J::1@@А!aDT&J::'J::@@@I@ OY
@@@L@ P\.J::@@@[@ Q`2J::@@@5J::@@@@@f&-reduceReverse@?U< <@U< <@б@гȠ%arrayJU< <KU< <@А!b e&V  8 JJJJJJJJJ@$@@AXU< <YU< <@@@@@ X	_U< <@@б@А!a c&\kU< < lU< <!@@б@б@А!auU< <%vU< <&@@б@А!b,'}U< <)~U< <*@@А!a-U< <0U< <1@@@7"@ ]2U< <(@@@&@ ^6U< <#	@@А!a+;U< <7U< <8@@@0@ _@
@@@3@ `CU< <@@@B@ aGU< <@@@K::@K::T;;@
  
`reduceReverse(xs, init, f)` works like `Belt.Array.reduce` except that
function `f` is applied to each item of `xs` from the last back to the first.

## Examples

```rescript
Belt.Array.reduceReverse(["a", "b", "c", "d"], "", (a, b) => a ++ b) == "dcba"
```
@@@@@@U< < @\'/reduceReverse2U@W<:<>W<:<M@б@г!tW<:<PW<:<Q@А!a 'f  8 @{3@@AW<:<SW<:<T@@@@@ h	W<:<U@@б@гa%arrayW<:<WW<:<\@А!b 'lW<:<^W<:<_@@@@@ n&W<:<`@@б@А!c 'r2W<:<cW<:<d@@б@гȠذW<:<gW<:<z@б@А!cDW<:<jW<:<k@@б@А!aQLW<:<nW<:<o@@б@А!b:T$W<:<r%W<:<s@@А!c-Z*W<:<y@@@D1@ s^.W<:<q#@@@g@ tb2W<:<m'@@@9@ uf+@з*Has_arity32@A@@@@ࠠ@@ w@A@@ xs8@@<
@@ {xHW<:<f=@@А!cP}MW<:<NW<:<@@@U@ 
@@@X@ UW<:<b@@@g@ v@@@@ \W<:<O@@@_W<:<:@@@@@(.reduceReverse2@ib==jb==@б@г1!ttb==ub==@А!a (  8 ttttttttt@$@@Ab==b==@@@@@ 	b==@@б@г%arrayb==b==@А!b (b==b==@@@@@ &b==@@б@А!c (2b==b==@@б@б@А!c<b==b==@@б@А!aIDb==b==@@б@А!b2Lb==b==@@А!c%Rb==b==@@@=*@ Wb==@@@`@ [b==	@@@2@ _b==@@А!c7db==b==@@@<@ i
@@@?@ lb==@@@N@ p]@@@n@ sb==@@@X<<@X<<a==@
  
`reduceReverse2(xs, ys, init, f)` reduces two arrays xs and ys;taking items
starting at `min(length(xs), length(ys))` down to and including zero.

## Examples

```rescript
Belt.Array.reduceReverse2([1, 2, 3], [1, 2], 0, (acc, x, y) => acc + x + y) == 6
```
@@@@@@b=="@)0reduceWithIndexU@d==d==@б@гנ!td==d==@А!a )  8 @3@@A(d==)d==@@@@@ 	/d==@@б@А!b );d==<d==@@б@гDd==Ed=>@б@А!b'Md==Nd==@@б@А!a4/Ud==Vd==@@б@г #int`d==ad=> @@	@@ @@@А!b4Djd=>&@@@8@ H)@@@P@ Kqd==-@@@?@ O1@з*Has_arity38@A@@@@ࠠ!@@ @A@@ \>@@B
@@ ad==C@@А!bVfd=>d=>@@@[@ k
@@@^@ nd==@@@m@ rd==@@@d==@@@@@x*/reduceWithIndex@q??q??@б@гm!tq??q??@А!a *  8 @$@@Aq??q??@@@@@ 	q??@@б@А!b *q??q??@@б@б@А!bq??q??@@б@А!a,'q??q??@@б@г#intq??q??@@	@@ 8@@А!b,<q??q??@@@1@ A@@@I@ D  q??@@@8@ H q??@@А!b=M 	q?? 
q??@@@B@ R
@@@E@ U q??@@@T@ Y q??@@@ e>>@  e>> p??@
  
Applies `f` to each element of `xs` from beginning to end. Function `f` has
three parameters: the item from the array and an “accumulator”, which starts 
with a value of `init` and the index of each element. `reduceWithIndex` returns
the final value of the accumulator.

## Examples

```rescript
Belt.Array.reduceWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16
```
@@@@@@ (q??@n+)joinWithU@ 1s?? 2s??@б@г!t <s?? =s??@А!a +  8  < < < < < < < < <@3@@A Js?? Ks??@@@@@ 	 Qs??@@б@г &string [s?? \s??@@	@@ @@б@г %5 hs?? is?@ @б@А!a.) qs?? rs??@@г 7&string zs??@@@@ 7@@@?@ :@з*Has_arity1!@A@@@@ࠠ.@@ @A@@ G'@@+
@@ L s??,@@г Y&string s?@ s?@@@	@@ Z@@@@ ]@@@J@ `M@@@^@ c s??@@@ s??@@@@@i,(joinWith@ B8B< B8BD@б@г!t B8BG B8BH@А!a 	,  8          @$@@A B8BJ B8BK@@@@@ 	 B8BL@@б@г &string B8BN B8BT@@	@@ @@б@б@А!a&! B8BW B8BX@@г &string B8B\ B8Bb@@	@@ 0@@@8@ 3!B8BV	@@г Ǡ&string!
B8Bg!B8Bm@@	@@ A@@@@ D@@@1@ G4@@@E@ J!B8BF@@@!t@@@!"!!t@@!"B5B7@
  &
`joinWith(xs, sep, toString)`

Concatenates all the elements of `xs` converted to string with `toString`, each
separated by `sep`, the string given as the second argument, into a single string.
If the array has only one element, then that element will be returned without 
using the separator. If the array is empty, the empty string will be returned.

## Examples

```rescript
Belt.Array.joinWith([0, 1], ", ", Js.Int.toString) == "0, 1"
Belt.Array.joinWith([], " ", Js.Int.toString) == ""
Belt.Array.joinWith([1], " ", Js.Int.toString) == "1"
```
@@@@@@!,B8B8"@_-%someU@!5BoBs!6BoBx@б@г!t!@BoB{!ABoB|@А!a $-
  8 !@!@!@!@!@!@!@!@!@@~3@@A!NBoB~!OBoB@@@@@ 	!UBoB@@б@г!*!]BoB!^BoB@б@А!a!fBoB!gBoB@@г!$bool!oBoB@@@@ (@@@0@ +@з*Has_arity1!@A@@@@ࠠ#@@ @A@@ 8'@@+
@@ =!BoB,@@г!)$bool!BoB!BoB@@	@@ K@@@@ !N@@@L@ "Q!BoBz@@@!BoBo@@@@@W.$some@!CC!CC@б@г r!t!CC!CC@А!a 5.%  8 !!!!!!!!!@v$@@A!CC!CC@@@@@ '	!CC@@б@б@А!a!CC!CC@@г!t$bool!CC!CC@@	@@ +!@@@)@ .$!CC	@@г!$bool!CC!CC@@	@@ /2@@@@ 25@@@3@ 38!CC@@@!BB@""BB"CC@
  5
`some(xs, p)` returns true if at least one of the elements in `xs` satifies `p`;
where `p` is a predicate: a function taking an element and returning a `bool`.

## Examples

```rescript
Belt.Array.some([2, 3, 4], (x) => mod(x, 2) == 1) == true

Belt.Array.some([(-1), (-3), (-5)], (x) => x > 0) == false
```
@@@@@@"CC@M/&everyU@"CD "CD@б@г ݠ!t" CD	"!CD
@А!a P/6  8 " " " " " " " " " @l3@@A".CD"/CD@@@@@ 8	"5CD@@б@г!
"=CD">CD@б@А!a"FCD"GCD@@г!砐$bool"OCD@@@@ <(@@@0@ ?+@з*Has_arity1!@A@@@@ࠠ@@ A@A@@ B8'@@+
@@ E="iCD,@@г"	$bool"qCD#"rCD'@@	@@ JK@@@@ MN@@@L@ NQ"}CD@@@"CC@@@@@W0%every@"EIEM"EIER@б@г!R!t"EIEU"EIEV@А!a a0Q  8 """""""""@v$@@A"EIEX"EIEY@@@@@ S	"EIEZ@@б@б@А!a"EIE]"EIE^@@г"T$bool"EIEb"EIEf@@	@@ W!@@@)@ Z$"EIE\	@@г"e$bool"EIEk"EIEo@@	@@ [2@@@@ ^5@@@3@ _8"EIET@@@"D(D(@""D(D("EFEH@
  
`every(xs, p)` returns `true` if all elements satisfy `p`; where `p` is a
predicate: a function taking an element and returning a `bool`.

## Examples

```rescript
Belt.Array.every([1, 3, 5], (x) => mod(x, 2) == 1) == true

Belt.Array.every([1, (-3), 5], (x) => x > 0) == false
```
@@@@@@"EIEI@M1'every2U@"EqEu"EqE|@б@г!!t# EqE#EqE@А!a 1b  8 # # # # # # # # # @l3@@A#EqE#EqE@@@@@ d	#EqE@@б@г"%array#EqE# EqE@А!b 1h#+EqE#,EqE@@@@@ j&#2EqE@@б@г"#:EqE#;EqE@б@А!a<7#CEqE#DEqE@@б@А!b%?#KEqE#LEqE@@г"점$bool#TEqE@@@@ nM@@@6@ qP#\EqE"@@@Y@ rT&@з*Has_arity2-@A@@@@ࠠ@@ t@A@@ ua3@@7
@@ xf#rEqE8@@г#$bool#zEqE#{EqE@@	@@ }t@@@@ w@@@X@ zg@@@x@ }#EqE~@@@#EqEq@@@@@2&every2@#GKGO#GKGU@б@г"^!t#GKGX#GKGY@А!a 2  8 #########@$@@A#GKG[#GKG\@@@@@ 	#GKG]@@б@г#>%array#GKG_#GKGd@А!b 2#GKGf#GKGg@@@@@ &#GKGh@@б@б@А!a4/#GKGl#GKGm@@б@А!b7#GKGp#GKGq@@г#$bool#GKGv#GKGz@@	@@ F@@@/@ I#GKGo	@@@R@ M#GKGj@@г#$bool$GKG$GKG@@	@@ [@@@@ ^@@@?@ aN@@@_@ d$GKGW@@@$EE@$$EE$GHGJ@
  
`every2(xs, ys, p)` returns true if `p(xi, yi)` is true for all pairs of
elements up to the shorter length (i.e. `min(length(xs), length(ys))`)

## Examples

```rescript
Belt.Array.every2([1, 2, 3], [0, 1], (a, b) => a > b) == true

Belt.Array.every2([], [1], (x, y) => x > y) == true

Belt.Array.every2([2, 3], [1], (x, y) => x > y) == true

Belt.Array.every2([0, 1], [5, 0], (x, y) => x > y) == false
```
@@@@@@$$GKGK"@y3&some2U@$-GG$.GG@б@г"!t$8GG$9GG@А!a 3  8 $8$8$8$8$8$8$8$8$8@3@@A$FGG$GGG@@@@@ 	$MGG@@б@г#ՠ%array$WGG$XGG@А!b 3$cGG$dGG@@@@@ &$jGG@@б@г$/?$rGG$sGG@б@А!a<7${GG$|GG@@б@А!b%?$GG$GG@@г$$$bool$GG@@@@ M@@@6@ P$GG"@@@Y@ T&@з*Has_arity2-@A@@@@ࠠD@@ @A@@ a3@@7
@@ f$GG8@@г$J$bool$GG$GG@@	@@ t@@@@ w@@@X@ zg@@@x@ }$GG@@@$GG@@@@@4%some2@$I I$$I I)@б@г#!t$I I,$I I-@А!a 4  8 $$$$$$$$$@$@@A$I I/$I I0@@@@@ 	$I I1@@б@г$v%array$I I3$I I8@А!b 4%I I:%I I;@@@@@ &%I I<@@б@б@А!a4/%I I@%I IA@@б@А!b7%I ID%I IE@@г$$bool%%I IJ%&I IN@@	@@ F@@@/@ I%.I IC	@@@R@ M%2I I>@@г$Ҡ$bool%:I IS%;I IW@@	@@ [@@@@ ^@@@?@ aN@@@_@ d%II I+@@@%LGG@%R%QGG%RII@
  Z
`some2(xs, ys, p)` returns true if `p(xi, yi)` is true for any pair of elements
up to the shorter length (i.e. `min(length(xs), length(ys))`)

## Examples

```rescript
Belt.Array.some2([0, 2], [1, 0, 3], (a, b) => a > b) == true

Belt.Array.some2([], [1], (x, y) => x > y) == false

Belt.Array.some2([2, 3], [1, 4], (x, y) => x > y) == true
```
@@@@@@%\I I "@y5$cmpU@%eIYI]%fIYIa@б@г$-!t%pIYId%qIYIe@А!a 5  8 %p%p%p%p%p%p%p%p%p@3@@A%~IYIg%IYIh@@@@@ 	%IYIi@@б@г$L!t%IYIk%IYIl@А!a%IYIn%IYIo@@@%@@ !%IYIp@@б@г%br%IYIs%IYI@б@А!a72%IYIv%IYIw@@б@А!a?:%IYIz%IYI{@@г%#int%IYI@@@@ H@@@P@ K%IYIy"@@@T@ O&@з*Has_arity2-@A@@@@ࠠw@@ @A@@ \3@@7
@@ a%IYIr8@@г%#int%IYI%IYI@@	@@ o@@@@ r@@@X@  ub@@@s@ x%IYIc@@@%IYIY@@@@@~6#cmp@&L3L7&L3L:@б@г$ɠ!t&L3L=&L3L>@А!a 6  8 &&&&&&&&&@$@@A&L3L@&L3LA@@@@@ 	&!L3LB@@б@г$蠐!t&+L3LD&,L3LE@А!a&2L3LG&3L3LH@@@%@@ !&9L3LI@@б@б@А!a/*&BL3LM&CL3LN@@б@А!a72&JL3LQ&KL3LR@@г&#int&SL3LW&TL3LZ@@	@@ A@@@I@ D&\L3LP	@@@M@ H&`L3LK@@г&(#int&hL3L_&iL3Lb@@	@@ V@@@@ Y@@@?@ \I@@@Z@ _&wL3L<@@@&zII@&&II&L0L2@
  
`cmp(xs, ys, f)` compared by length if `length(xs) != length(ys)`; returning `-1`
if `length(xs) < length(ys)` or 1 if `length(xs) > length(ys)`. Otherwise
compare one by one `f(x, y)`. `f` returns a negative number if `x` is “less than” `y`
zero if `x` is “equal to” `y` a positive number if `x` is “greater than”
`y`. The comparison returns the first non-zero result of `f`; or zero if `f`
returns zero for all `x` and `y`.

## Examples

```rescript
Belt.Array.cmp([1, 3, 5], [1, 4, 2], (a, b) => compare(a, b)) == -1

Belt.Array.cmp([1, 3, 5], [1, 2, 3], (a, b) => compare(a, b)) == 1

Belt.Array.cmp([1, 3, 5], [1, 3, 5], (a, b) => compare(a, b)) == 0
```
@@@@@@&L3L3"@t7#eqU@&LdLh&LdLk@б@г%[!t&LdLn&LdLo@А!a =7  8 &&&&&&&&&@3@@A&LdLq&LdLr@@@@@ 	&LdLs@@б@г%z!t&LdLu&LdLv@А!a&LdLx&LdLy@@@%@@ #!&LdLz@@б@г&&LdL}&LdL@б@А!a72&LdL&LdL@@б@А!a?:&LdL&LdL@@г&$bool&LdL@@@@ 'H@@@P@ *K&LdL"@@@T@ +O&@з*Has_arity2-@A@@@@ࠠ@@ -@A@@ .\3@@7
@@ 1a'LdL|8@@г&$bool'LdL'LdL@@	@@ 6o@@@@ 9r@@@X@ :ub@@@s@ ;x'"LdLm@@@'%LdLd@@@@@~8"eq@'/MM'0MM@б@г%!t':MM';MM@А!a U8>  8 ':':':':':':':':':@$@@A'HMM'IMM@@@@@ @	'OMM@@б@г&!t'YMM'ZMM@А!a'`MM'aMM@@@%@@ E!'gMM@@б@б@А!a/*'pMM'qMM@@б@А!a72'xMM'yMM@@г'$bool'MM'MM@@	@@ IA@@@I@ LD'MM	@@@M@ MH'MM@@г'.$bool'MM'MM@@	@@ NV@@@@ QY@@@?@ R\I@@@Z@ S_'MM@@@'LL@''LL'MM@
  
`eq(xs, ys)` return `false` if length is not the same otherwise compare items
one by one using `f(xi, yi)`; and return true if all results are true false otherwise

## Examples

```rescript
Belt.Array.eq([1, 2, 3], [(-1), (-2), (-3)], (a, b) => abs(a) == abs(b)) == true
```
@@@@@@'MM"@t96truncateToLengthUnsafe@'ObOk'ObO@б@г&!t'ObO'ObO@А!a e9V  8 '''''''''@3@@A'ObO'ObO@@@@@ X	'ObO@@б@г'#int'ObO'ObO@@	@@ \@@г'$unit'ObO'ObO@@	@@ _&@@@@ b)@@@'@ c,(ObO@@&lengthBA	!            BE&length@@@@@(MM(ObO@((MM(O_Oa@
  s
Unsafe `truncateToLengthUnsafe(xs, n)` sets length of array `xs` to `n`. If `n`
is greater than the length of `xs`; the extra elements are set to `Js.Null_undefined.null`.
If `n` is less than zero; raises a `RangeError`.

## Examples

```rescript
let arr = ["ant", "bee", "cat", "dog", "elk"]

Belt.Array.truncateToLengthUnsafe(arr, 3)

arr == ["ant", "bee", "cat"]
```
@@@@@@@I:%initU@((OO()OO@б@г'#int(3OO(4OO@@	@@ f  8 (-(-(-(-(-(-(-(-(-@b}5@@A@@б@г' (BOO(COO@б@г(#int(NOO(OOO@@	@@ i@@А!a :l$(]OO@@@	@ m(@з*Has_arity1&@A@@@@ࠠ @@ o@A@@ p5,@@0
@@ s:(sOO1@@г'8!t({OO(|OO@А!a*I(OO(OO@@@0@@ yP(OO@@@@ }T@@@Z@ ~W(OO@@@(OO@@@@@];$init@(OO(OO@б@г(h#int(OO(OO@@	@@   8 (((((((((@v@@A@@б@б@г({#int(OO(OO@@	@@ @@А!a ;(OO(OO@@@
@ !@@г'!t(OO(OO@А!a/(OO(OO@@@@@ 6(OO@@@@ :-@@@@@ =(OO@@@(OO@@@@@C<$push@(P?PH(P?PL@б@г'!t)P?PO)P?PP@А!a <  8 )))))))))@bw$@@A)P?PR)P?PS@@@@@ 	)P?PT@@б@А!a)P?PW) P?PX@@г($unit)(P?P]))P?Pa@@	@@ @@@'@ ")1P?PV	@@@!@ &)5P?PN@@$pushBA	             BE$push@@@@@@)>OO)?P?Pj@)E)DOO)EP6P8@	A
`arr->push(item)` pushes an element `item` into an array `arr`.
@@@@@@@C@((@''''\'B&&&&&E&*%ՠ%%f%Q$$$$$Q$<#####a#L#""""T"?!!!y!d      ;&oZ W;'K6 aLȠWB̠iTנmX⠠j⠠mXԠcNΠaLŠQ<!'-pj
۠

8
2			)	#;5ᠠ_YWQѠ#s^ʠI4젠b\	@  8 )))))))))@@@A@@  T 	C/home/runner/work/rescript-compiler/rescript-compiler/linux/bsc.exe'-bs-cmi'-bs-cmj--no-keep-locs.-no-alias-deps5-bs-no-version-header8-bs-no-check-div-by-zero)-nostdlib4-bs-cross-module-opt--make-runtime--nopervasives'-unsafe"-w#+50+-warn-error!A%-open.Belt_internals"-I&others**	</home/runner/work/rescript-compiler/rescript-compiler/jscomp	H/home/runner/work/rescript-compiler/rescript-compiler/linux/../lib/ocaml@0rA
V*Bk-3  8 *
*
*
*
*
*
*
*
*
@*	@@@*"0Bʢ&56((0jwn/<ܸ&0.?<!H"{@0Bʢ&56(A