@@ -205,7 +205,7 @@ Belt.Array.rangeBy(3, 3, ~step=1) == [3]
205
205
*/
206
206
let rangeBy: (int, int, ~step: int) => array<int>
207
207
208
- let makeByU: (int, (. int) => 'a) => t<'a>
208
+ let makeByU: (int, int => 'a) => t<'a>
209
209
/**
210
210
`makeBy(n, f)` return an empty array when n is negative return an array of size
211
211
n populated by `f(i)` start from `0` to `n - 1`.
@@ -220,7 +220,7 @@ Belt.Array.makeBy(5, (i) => i * i) == [0, 1, 4, 9, 16]
220
220
*/
221
221
let makeBy: (int, int => 'a) => t<'a>
222
222
223
- let makeByAndShuffleU: (int, (. int) => 'a) => t<'a>
223
+ let makeByAndShuffleU: (int, int => 'a) => t<'a>
224
224
/**
225
225
Equivalent to `shuffle(makeBy(n, f))`
226
226
*/
@@ -238,7 +238,7 @@ Belt.Array.zip([1, 2], [3, 4, 5]) == [(1, 3), (2, 4)]
238
238
*/
239
239
let zip: (t<'a>, array<'b>) => array<('a, 'b)>
240
240
241
- let zipByU: (t<'a>, array<'b>, (. 'a, 'b) => 'c) => array<'c>
241
+ let zipByU: (t<'a>, array<'b>, ('a, 'b) => 'c) => array<'c>
242
242
/**
243
243
`zipBy(xs, ys, f)` create an array by applying `f` to corresponding elements of
244
244
`xs` and `ys`. Stops with shorter array.
@@ -392,7 +392,7 @@ Unsafe blit without bounds checking.
392
392
*/
393
393
let blitUnsafe: (~src: t<'a>, ~srcOffset: int, ~dst: t<'a>, ~dstOffset: int, ~len: int) => unit
394
394
395
- let forEachU: (t<'a>, (. 'a) => unit) => unit
395
+ let forEachU: (t<'a>, 'a => unit) => unit
396
396
/**
397
397
`forEach(xs, f)`
398
398
@@ -420,7 +420,7 @@ total.contents == 1 + 2 + 3 + 4
420
420
*/
421
421
let forEach: (t<'a>, 'a => unit) => unit
422
422
423
- let mapU: (t<'a>, (. 'a) => 'b) => array<'b>
423
+ let mapU: (t<'a>, 'a => 'b) => array<'b>
424
424
/**
425
425
`map(xs, f)` returns a new array by calling `f` for each element of `xs` from
426
426
the beginning to end.
@@ -433,7 +433,7 @@ Belt.Array.map([1, 2], (x) => x + 1) == [3, 4]
433
433
*/
434
434
let map: (t<'a>, 'a => 'b) => array<'b>
435
435
436
- let flatMapU: (t<'a>, (. 'a) => array<'b>) => array<'b>
436
+ let flatMapU: (t<'a>, 'a => array<'b>) => array<'b>
437
437
/**
438
438
`flatMap(xs, f)` returns a new array by calling `f` for each element of `xs` from
439
439
the beginning to end, concatenating the results.
@@ -446,7 +446,7 @@ Belt.Array.flatMap([1, 2], x => [x + 10, x + 20]) == [11, 21, 12, 22]
446
446
*/
447
447
let flatMap: (t<'a>, 'a => array<'b>) => array<'b>
448
448
449
- let getByU: (t<'a>, (. 'a) => bool) => option<'a>
449
+ let getByU: (t<'a>, 'a => bool) => option<'a>
450
450
/**
451
451
`getBy(xs, p)` returns `Some(value)` for the first value in `xs` that satisifies
452
452
the predicate function `p`; returns `None` if no element satisifies the function.
@@ -460,7 +460,7 @@ Belt.Array.getBy([15, 13, 11], (x) => mod(x, 2) == 0) == None
460
460
*/
461
461
let getBy: (t<'a>, 'a => bool) => option<'a>
462
462
463
- let getIndexByU: (t<'a>, (. 'a) => bool) => option<int>
463
+ let getIndexByU: (t<'a>, 'a => bool) => option<int>
464
464
/**
465
465
`getIndexBy(xs, p)` returns `Some(index)` for the first value in `xs` that
466
466
satisifies the predicate function `p`; returns `None` if no element satisifies
@@ -475,13 +475,13 @@ Belt.Array.getIndexBy([15, 13, 11], (x) => mod(x, 2) == 0) == None
475
475
*/
476
476
let getIndexBy: (t<'a>, 'a => bool) => option<int>
477
477
478
- let keepU: (t<'a>, (. 'a) => bool) => t<'a>
478
+ let keepU: (t<'a>, 'a => bool) => t<'a>
479
479
/**
480
480
`keep(xs, p)` returns a new array that keep all elements satisfy `p`.
481
481
*/
482
482
let keep: (t<'a>, 'a => bool) => t<'a>
483
483
484
- let keepWithIndexU: (t<'a>, (. 'a, int) => bool) => t<'a>
484
+ let keepWithIndexU: (t<'a>, ('a, int) => bool) => t<'a>
485
485
/**
486
486
`keepWithIndex(xs, p)` returns a new array that keep all elements satisfy `p`.
487
487
@@ -493,7 +493,7 @@ Belt.Array.keepWithIndex([1, 2, 3], (_x, i) => i == 1) == [2]
493
493
*/
494
494
let keepWithIndex: (t<'a>, ('a, int) => bool) => t<'a>
495
495
496
- let keepMapU: (t<'a>, (. 'a) => option<'b>) => array<'b>
496
+ let keepMapU: (t<'a>, 'a => option<'b>) => array<'b>
497
497
/**
498
498
`keepMap(xs, p)` returns a new array that keep all elements that return a non
499
499
None applied `p`.
@@ -513,7 +513,7 @@ Belt.Array.keepMap([1, 2, 3], x =>
513
513
*/
514
514
let keepMap: (t<'a>, 'a => option<'b>) => array<'b>
515
515
516
- let forEachWithIndexU: (t<'a>, (. int, 'a) => unit) => unit
516
+ let forEachWithIndexU: (t<'a>, (int, 'a) => unit) => unit
517
517
/**
518
518
`forEachWithIndex(xs, f)` same as `Belt.Array.forEach`, except that `f` is
519
519
supplied two arguments: the index starting from 0 and the element from `xs`.
@@ -538,7 +538,7 @@ total.contents == 0 + 10 + 1 + 11 + 2 + 12 + 3 + 13
538
538
*/
539
539
let forEachWithIndex: (t<'a>, (int, 'a) => unit) => unit
540
540
541
- let mapWithIndexU: (t<'a>, (. int, 'a) => 'b) => array<'b>
541
+ let mapWithIndexU: (t<'a>, (int, 'a) => 'b) => array<'b>
542
542
/**
543
543
`mapWithIndex(xs, f)` applies `f` to each element of `xs`. Function `f` takes
544
544
two arguments: the index starting from 0 and the element from `xs`.
@@ -551,7 +551,7 @@ Belt.Array.mapWithIndex([1, 2, 3], (i, x) => i + x) == [0 + 1, 1 + 2, 2 + 3]
551
551
*/
552
552
let mapWithIndex: (t<'a>, (int, 'a) => 'b) => array<'b>
553
553
554
- let partitionU: (t<'a>, (. 'a) => bool) => (t<'a>, t<'a>)
554
+ let partitionU: (t<'a>, 'a => bool) => (t<'a>, t<'a>)
555
555
/**
556
556
`partition(f, a)` split array into tuple of two arrays based on predicate `f`;
557
557
first of tuple where predicate cause true, second where predicate cause false
@@ -566,7 +566,7 @@ Belt.Array.partition([1, 2, 3, 4, 5], (x) => mod(x, 2) != 0) == ([1, 3, 5], [2,
566
566
*/
567
567
let partition: (t<'a>, 'a => bool) => (t<'a>, t<'a>)
568
568
569
- let reduceU: (array<'b>, 'a, (. 'a, 'b) => 'a) => 'a
569
+ let reduceU: (array<'b>, 'a, ('a, 'b) => 'a) => 'a
570
570
/**
571
571
`reduce(xs, init, f)` applies `f` to each element of `xs` from beginning to end.
572
572
Function `f` has two parameters: the item from the list and an “accumulator”;
@@ -583,7 +583,7 @@ Belt.Array.reduce(["a", "b", "c", "d"], "", (a, b) => a ++ b) == "abcd"
583
583
*/
584
584
let reduce: (array<'b>, 'a, ('a, 'b) => 'a) => 'a
585
585
586
- let reduceReverseU: (array<'b>, 'a, (. 'a, 'b) => 'a) => 'a
586
+ let reduceReverseU: (array<'b>, 'a, ('a, 'b) => 'a) => 'a
587
587
/**
588
588
`reduceReverse(xs, init, f)` works like `Belt.Array.reduce` except that
589
589
function `f` is applied to each item of `xs` from the last back to the first.
@@ -596,7 +596,7 @@ Belt.Array.reduceReverse(["a", "b", "c", "d"], "", (a, b) => a ++ b) == "dcba"
596
596
*/
597
597
let reduceReverse: (array<'b>, 'a, ('a, 'b) => 'a) => 'a
598
598
599
- let reduceReverse2U: (t<'a>, array<'b>, 'c, (. 'c, 'a, 'b) => 'c) => 'c
599
+ let reduceReverse2U: (t<'a>, array<'b>, 'c, ('c, 'a, 'b) => 'c) => 'c
600
600
/**
601
601
`reduceReverse2(xs, ys, init, f)` reduces two arrays xs and ys;taking items
602
602
starting at `min(length(xs), length(ys))` down to and including zero.
@@ -609,7 +609,7 @@ Belt.Array.reduceReverse2([1, 2, 3], [1, 2], 0, (acc, x, y) => acc + x + y) == 6
609
609
*/
610
610
let reduceReverse2: (t<'a>, array<'b>, 'c, ('c, 'a, 'b) => 'c) => 'c
611
611
612
- let reduceWithIndexU: (t<'a>, 'b, (. 'b, 'a, int) => 'b) => 'b
612
+ let reduceWithIndexU: (t<'a>, 'b, ('b, 'a, int) => 'b) => 'b
613
613
/**
614
614
Applies `f` to each element of `xs` from beginning to end. Function `f` has
615
615
three parameters: the item from the array and an “accumulator”, which starts
@@ -624,7 +624,7 @@ Belt.Array.reduceWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16
624
624
*/
625
625
let reduceWithIndex: (t<'a>, 'b, ('b, 'a, int) => 'b) => 'b
626
626
627
- let joinWithU: (t<'a>, string, (. 'a) => string) => string
627
+ let joinWithU: (t<'a>, string, 'a => string) => string
628
628
/**
629
629
`joinWith(xs, sep, toString)`
630
630
@@ -643,7 +643,7 @@ Belt.Array.joinWith([1], " ", Js.Int.toString) == "1"
643
643
*/
644
644
let joinWith: (t<'a>, string, 'a => string) => string
645
645
646
- let someU: (t<'a>, (. 'a) => bool) => bool
646
+ let someU: (t<'a>, 'a => bool) => bool
647
647
/**
648
648
`some(xs, p)` returns true if at least one of the elements in `xs` satifies `p`;
649
649
where `p` is a predicate: a function taking an element and returning a `bool`.
@@ -658,7 +658,7 @@ Belt.Array.some([(-1), (-3), (-5)], (x) => x > 0) == false
658
658
*/
659
659
let some: (t<'a>, 'a => bool) => bool
660
660
661
- let everyU: (t<'a>, (. 'a) => bool) => bool
661
+ let everyU: (t<'a>, 'a => bool) => bool
662
662
/**
663
663
`every(xs, p)` returns `true` if all elements satisfy `p`; where `p` is a
664
664
predicate: a function taking an element and returning a `bool`.
@@ -673,7 +673,7 @@ Belt.Array.every([1, (-3), 5], (x) => x > 0) == false
673
673
*/
674
674
let every: (t<'a>, 'a => bool) => bool
675
675
676
- let every2U: (t<'a>, array<'b>, (. 'a, 'b) => bool) => bool
676
+ let every2U: (t<'a>, array<'b>, ('a, 'b) => bool) => bool
677
677
/**
678
678
`every2(xs, ys, p)` returns true if `p(xi, yi)` is true for all pairs of
679
679
elements up to the shorter length (i.e. `min(length(xs), length(ys))`)
@@ -692,7 +692,7 @@ Belt.Array.every2([0, 1], [5, 0], (x, y) => x > y) == false
692
692
*/
693
693
let every2: (t<'a>, array<'b>, ('a, 'b) => bool) => bool
694
694
695
- let some2U: (t<'a>, array<'b>, (. 'a, 'b) => bool) => bool
695
+ let some2U: (t<'a>, array<'b>, ('a, 'b) => bool) => bool
696
696
/**
697
697
`some2(xs, ys, p)` returns true if `p(xi, yi)` is true for any pair of elements
698
698
up to the shorter length (i.e. `min(length(xs), length(ys))`)
@@ -709,7 +709,7 @@ Belt.Array.some2([2, 3], [1, 4], (x, y) => x > y) == true
709
709
*/
710
710
let some2: (t<'a>, array<'b>, ('a, 'b) => bool) => bool
711
711
712
- let cmpU: (t<'a>, t<'a>, (. 'a, 'a) => int) => int
712
+ let cmpU: (t<'a>, t<'a>, ('a, 'a) => int) => int
713
713
/**
714
714
`cmp(xs, ys, f)` compared by length if `length(xs) != length(ys)`; returning `-1`
715
715
if `length(xs) < length(ys)` or 1 if `length(xs) > length(ys)`. Otherwise
@@ -730,7 +730,7 @@ Belt.Array.cmp([1, 3, 5], [1, 3, 5], (a, b) => compare(a, b)) == 0
730
730
*/
731
731
let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int
732
732
733
- let eqU: (t<'a>, t<'a>, (. 'a, 'a) => bool) => bool
733
+ let eqU: (t<'a>, t<'a>, ('a, 'a) => bool) => bool
734
734
/**
735
735
`eq(xs, ys)` return `false` if length is not the same otherwise compare items
736
736
one by one using `f(xi, yi)`; and return true if all results are true false otherwise
@@ -761,7 +761,7 @@ arr == ["ant", "bee", "cat"]
761
761
*/
762
762
external truncateToLengthUnsafe: (t<'a>, int) => unit = "length"
763
763
764
- let initU: (int, (. int) => 'a) => t<'a>
764
+ let initU: (int, int => 'a) => t<'a>
765
765
let init: (int, int => 'a) => t<'a>
766
766
767
767
/**
0 commit comments