@@ -191,6 +191,7 @@ let rangeBy: (int, int, ~step: int) => array<int>
191191
192192@deprecated ("Use `makeBy` instead" )
193193let makeByU : (int , int => 'a ) => t <'a >
194+
194195/**
195196`makeBy(n, f)` return an empty array when n is negative return an array of size
196197n populated by `f(i)` start from `0` to `n - 1`.
@@ -207,6 +208,7 @@ let makeBy: (int, int => 'a) => t<'a>
207208
208209@deprecated ("Use `makeByAndShuffle` instead" )
209210let makeByAndShuffleU : (int , int => 'a ) => t <'a >
211+
210212/**
211213Equivalent to `shuffle(makeBy(n, f))`
212214*/
@@ -226,6 +228,7 @@ let zip: (t<'a>, array<'b>) => array<('a, 'b)>
226228
227229@deprecated ("Use `zipBy` instead" )
228230let zipByU : (t <'a >, array <'b >, ('a , 'b ) => 'c ) => array <'c >
231+
229232/**
230233`zipBy(xs, ys, f)` create an array by applying `f` to corresponding elements of
231234`xs` and `ys`. Stops with shorter array.
@@ -382,6 +385,7 @@ let blitUnsafe: (~src: t<'a>, ~srcOffset: int, ~dst: t<'a>, ~dstOffset: int, ~le
382385
383386@deprecated ("Use `forEach` instead" )
384387let forEachU : (t <'a >, 'a => unit ) => unit
388+
385389/**
386390`forEach(xs, f)`
387391
@@ -411,6 +415,7 @@ let forEach: (t<'a>, 'a => unit) => unit
411415
412416@deprecated ("Use `map` instead" )
413417let mapU : (t <'a >, 'a => 'b ) => array <'b >
418+
414419/**
415420`map(xs, f)` returns a new array by calling `f` for each element of `xs` from
416421the beginning to end.
@@ -425,6 +430,7 @@ let map: (t<'a>, 'a => 'b) => array<'b>
425430
426431@deprecated ("Use `flatMap` instead" )
427432let flatMapU : (t <'a >, 'a => array <'b >) => array <'b >
433+
428434/**
429435`flatMap(xs, f)` returns a new array by calling `f` for each element of `xs` from
430436the beginning to end, concatenating the results.
@@ -439,6 +445,7 @@ let flatMap: (t<'a>, 'a => array<'b>) => array<'b>
439445
440446@deprecated ("Use `getBy` instead" )
441447let getByU : (t <'a >, 'a => bool ) => option <'a >
448+
442449/**
443450`getBy(xs, p)` returns `Some(value)` for the first value in `xs` that satisifies
444451the predicate function `p`; returns `None` if no element satisifies the function.
@@ -454,6 +461,7 @@ let getBy: (t<'a>, 'a => bool) => option<'a>
454461
455462@deprecated ("Use `getIndexBy` instead" )
456463let getIndexByU : (t <'a >, 'a => bool ) => option <int >
464+
457465/**
458466`getIndexBy(xs, p)` returns `Some(index)` for the first value in `xs` that
459467satisifies the predicate function `p`; returns `None` if no element satisifies
@@ -470,13 +478,15 @@ let getIndexBy: (t<'a>, 'a => bool) => option<int>
470478
471479@deprecated ("Use `keep` instead" )
472480let keepU : (t <'a >, 'a => bool ) => t <'a >
481+
473482/**
474483`keep(xs, p)` returns a new array that keep all elements satisfy `p`.
475484*/
476485let keep : (t <'a >, 'a => bool ) => t <'a >
477486
478487@deprecated ("Use `keepWithIndex` instead" )
479488let keepWithIndexU : (t <'a >, ('a , int ) => bool ) => t <'a >
489+
480490/**
481491`keepWithIndex(xs, p)` returns a new array that keep all elements satisfy `p`.
482492
@@ -490,6 +500,7 @@ let keepWithIndex: (t<'a>, ('a, int) => bool) => t<'a>
490500
491501@deprecated ("Use `keepMap` instead" )
492502let keepMapU : (t <'a >, 'a => option <'b >) => array <'b >
503+
493504/**
494505`keepMap(xs, p)` returns a new array that keep all elements that return a non
495506None applied `p`.
@@ -510,6 +521,7 @@ let keepMap: (t<'a>, 'a => option<'b>) => array<'b>
510521
511522@deprecated ("Use `forEachWithIndex` instead" )
512523let forEachWithIndexU : (t <'a >, (int , 'a ) => unit ) => unit
524+
513525/**
514526`forEachWithIndex(xs, f)` same as `Belt.Array.forEach`, except that `f` is
515527supplied two arguments: the index starting from 0 and the element from `xs`.
@@ -538,6 +550,7 @@ let forEachWithIndex: (t<'a>, (int, 'a) => unit) => unit
538550
539551@deprecated ("Use `mapWithIndex` instead" )
540552let mapWithIndexU : (t <'a >, (int , 'a ) => 'b ) => array <'b >
553+
541554/**
542555`mapWithIndex(xs, f)` applies `f` to each element of `xs`. Function `f` takes
543556two arguments: the index starting from 0 and the element from `xs`.
@@ -552,6 +565,7 @@ let mapWithIndex: (t<'a>, (int, 'a) => 'b) => array<'b>
552565
553566@deprecated ("Use `partition` instead" )
554567let partitionU : (t <'a >, 'a => bool ) => (t <'a >, t <'a >)
568+
555569/**
556570`partition(f, a)` split array into tuple of two arrays based on predicate `f`;
557571first of tuple where predicate cause true, second where predicate cause false
@@ -568,6 +582,7 @@ let partition: (t<'a>, 'a => bool) => (t<'a>, t<'a>)
568582
569583@deprecated ("Use `reduce` instead" )
570584let reduceU : (array <'b >, 'a , ('a , 'b ) => 'a ) => 'a
585+
571586/**
572587`reduce(xs, init, f)` applies `f` to each element of `xs` from beginning to end.
573588Function `f` has two parameters: the item from the list and an “accumulator”;
@@ -586,6 +601,7 @@ let reduce: (array<'b>, 'a, ('a, 'b) => 'a) => 'a
586601
587602@deprecated ("Use `reduceReverse` instead" )
588603let reduceReverseU : (array <'b >, 'a , ('a , 'b ) => 'a ) => 'a
604+
589605/**
590606`reduceReverse(xs, init, f)` works like `Belt.Array.reduce` except that
591607function `f` is applied to each item of `xs` from the last back to the first.
@@ -600,6 +616,7 @@ let reduceReverse: (array<'b>, 'a, ('a, 'b) => 'a) => 'a
600616
601617@deprecated ("Use `reduceReverse2` instead" )
602618let reduceReverse2U : (t <'a >, array <'b >, 'c , ('c , 'a , 'b ) => 'c ) => 'c
619+
603620/**
604621`reduceReverse2(xs, ys, init, f)` reduces two arrays xs and ys;taking items
605622starting at `min(length(xs), length(ys))` down to and including zero.
@@ -614,6 +631,7 @@ let reduceReverse2: (t<'a>, array<'b>, 'c, ('c, 'a, 'b) => 'c) => 'c
614631
615632@deprecated ("Use `reduceWithIndex` instead" )
616633let reduceWithIndexU : (t <'a >, 'b , ('b , 'a , int ) => 'b ) => 'b
634+
617635/**
618636Applies `f` to each element of `xs` from beginning to end. Function `f` has
619637three parameters: the item from the array and an “accumulator”, which starts
@@ -630,6 +648,7 @@ let reduceWithIndex: (t<'a>, 'b, ('b, 'a, int) => 'b) => 'b
630648
631649@deprecated ("Use `joinWith` instead" )
632650let joinWithU : (t <'a >, string , 'a => string ) => string
651+
633652/**
634653`joinWith(xs, sep, toString)`
635654
@@ -650,6 +669,7 @@ let joinWith: (t<'a>, string, 'a => string) => string
650669
651670@deprecated ("Use `some` instead" )
652671let someU : (t <'a >, 'a => bool ) => bool
672+
653673/**
654674`some(xs, p)` returns true if at least one of the elements in `xs` satifies `p`;
655675where `p` is a predicate: a function taking an element and returning a `bool`.
@@ -666,6 +686,7 @@ let some: (t<'a>, 'a => bool) => bool
666686
667687@deprecated ("Use `every` instead" )
668688let everyU : (t <'a >, 'a => bool ) => bool
689+
669690/**
670691`every(xs, p)` returns `true` if all elements satisfy `p`; where `p` is a
671692predicate: a function taking an element and returning a `bool`.
@@ -682,6 +703,7 @@ let every: (t<'a>, 'a => bool) => bool
682703
683704@deprecated ("Use `every2` instead" )
684705let every2U : (t <'a >, array <'b >, ('a , 'b ) => bool ) => bool
706+
685707/**
686708`every2(xs, ys, p)` returns true if `p(xi, yi)` is true for all pairs of
687709elements up to the shorter length (i.e. `min(length(xs), length(ys))`)
@@ -702,6 +724,7 @@ let every2: (t<'a>, array<'b>, ('a, 'b) => bool) => bool
702724
703725@deprecated ("Use `some2` instead" )
704726let some2U : (t <'a >, array <'b >, ('a , 'b ) => bool ) => bool
727+
705728/**
706729`some2(xs, ys, p)` returns true if `p(xi, yi)` is true for any pair of elements
707730up to the shorter length (i.e. `min(length(xs), length(ys))`)
@@ -720,6 +743,7 @@ let some2: (t<'a>, array<'b>, ('a, 'b) => bool) => bool
720743
721744@deprecated ("Use `cmp` instead" )
722745let cmpU : (t <'a >, t <'a >, ('a , 'a ) => int ) => int
746+
723747/**
724748`cmp(xs, ys, f)` compared by length if `length(xs) != length(ys)`; returning `-1`
725749if `length(xs) < length(ys)` or 1 if `length(xs) > length(ys)`. Otherwise
@@ -742,6 +766,7 @@ let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int
742766
743767@deprecated ("Use `eq` instead" )
744768let eqU : (t <'a >, t <'a >, ('a , 'a ) => bool ) => bool
769+
745770/**
746771`eq(xs, ys)` return `false` if length is not the same otherwise compare items
747772one by one using `f(xi, yi)`; and return true if all results are true false otherwise
@@ -774,6 +799,7 @@ external truncateToLengthUnsafe: (t<'a>, int) => unit = "length"
774799
775800@deprecated ("Use `init` instead" )
776801let initU : (int , int => 'a ) => t <'a >
802+
777803let init : (int , int => 'a ) => t <'a >
778804
779805/**
0 commit comments