Skip to content

Commit 23ace1f

Browse files
authoredMar 1, 2023
Array additions (#49)
* feat(array): add findMap * feat(array): add init * feat(array): add make * feat(array): add keepSome * refactor(array): bind to flatMap instead of reimplementing it * refactor(array/make): use fillAllInPlace instead of manual loop * feat(array): use labelled argument for length in make and init * refactor(array): rename init -> fromInitializer * test(array): add tests for non-native functions * refactor(array): bind to native reduce instead of reimplementing it * refactor(array): replace reduceReverse with native binding to reduceRight * refactor(array): use native reduceWithIndex instead of reimplementing it * feat(array): add reduceRightWithIndex * docs(array): add docs for make, fromInitializer, findMap and keepSome * docs(changelog): update changelog for array additions * docs(array): fix docstring fro keepSome * fix(array): reorder args of reduce functions for better te inference * refactor(array): consistent type variable naming in reduce functions
·
1.6.10.2.0
1 parent 847e916 commit 23ace1f

File tree

9 files changed

+732
-81
lines changed

9 files changed

+732
-81
lines changed
 

‎CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
- Change `Float.parseFloat` signature. Now accepts only string. https://github.com/rescript-association/rescript-core/pull/54
2020
- Add `getExn`, `getUnsafe`, `getWithDefault`, `map`, `mapWithDefault` and `flatMap` to `Nullable`. https://github.com/rescript-association/rescript-core/pull/67
2121
- Add `getExn`, `getUnsafe`, `getWithDefault`, `map`, `mapWithDefault` and `flatMap` to `Null`. https://github.com/rescript-association/rescript-core/pull/73
22+
- Add `make`, `fromInitializer`, `findMap`, `keepSome`, `reduceRight` and `reduceRightWithIndex`. https://github.com/rescript-association/rescript-core/pull/49
23+
- Remove `reduceReverse` in favor of `reduceRight`. https://github.com/rescript-association/rescript-core/pull/49
24+
- Fixed type signatures of `reduce` and `reduceWithIndex`. https://github.com/rescript-association/rescript-core/pull/49
2225

2326
### Documentation
2427

‎package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
"clean": "rescript clean",
66
"build": "rescript",
77
"watch": "rescript build -w",
8-
"test": "node test/PromiseTest.mjs && node test/TempTests.mjs"
8+
"test": "node test/TestSuite.mjs && node test/TempTests.mjs"
99
},
10-
"keywords": [
11-
"rescript"
12-
],
10+
"keywords": ["rescript"],
1311
"homepage": "https://github.com/rescript-association/rescript-core",
1412
"author": "ReScript Team",
1513
"license": "MIT",

‎src/Core__Array.mjs

Lines changed: 56 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,26 @@
33
import * as Curry from "rescript/lib/es6/curry.js";
44
import * as Js_math from "rescript/lib/es6/js_math.js";
55
import * as Caml_option from "rescript/lib/es6/caml_option.js";
6-
import * as Caml_splice_call from "rescript/lib/es6/caml_splice_call.js";
6+
7+
function make(length, x) {
8+
if (length <= 0) {
9+
return [];
10+
}
11+
var arr = new Array(length);
12+
arr.fill(x);
13+
return arr;
14+
}
15+
16+
function fromInitializer(length, f) {
17+
if (length <= 0) {
18+
return [];
19+
}
20+
var arr = new Array(length);
21+
for(var i = 0; i < length; ++i){
22+
arr[i] = Curry._1(f, i);
23+
}
24+
return arr;
25+
}
726

827
function indexOfOpt(arr, item) {
928
var index = arr.indexOf(item);
@@ -27,31 +46,20 @@ function sort(arr, cmp) {
2746
return result;
2847
}
2948

30-
function reduce(a, x, f) {
31-
var f$1 = Curry.__2(f);
32-
var r = x;
33-
for(var i = 0 ,i_finish = a.length; i < i_finish; ++i){
34-
r = f$1(r, a[i]);
35-
}
36-
return r;
49+
function reduce(arr, init, f) {
50+
return arr.reduce(f, init);
3751
}
3852

39-
function reduceWithIndex(a, x, f) {
40-
var f$1 = Curry.__3(f);
41-
var r = x;
42-
for(var i = 0 ,i_finish = a.length; i < i_finish; ++i){
43-
r = f$1(r, a[i], i);
44-
}
45-
return r;
53+
function reduceWithIndex(arr, init, f) {
54+
return arr.reduce(f, init);
4655
}
4756

48-
function reduceReverse(a, x, f) {
49-
var f$1 = Curry.__2(f);
50-
var r = x;
51-
for(var i = a.length - 1 | 0; i >= 0; --i){
52-
r = f$1(r, a[i]);
53-
}
54-
return r;
57+
function reduceRight(arr, init, f) {
58+
return arr.reduceRight(f, init);
59+
}
60+
61+
function reduceRightWithIndex(arr, init, f) {
62+
return arr.reduceRight(f, init);
5563
}
5664

5765
function findIndexOpt(array, finder) {
@@ -108,22 +116,44 @@ function filterMap(a, f) {
108116
return r;
109117
}
110118

111-
function flatMap(a, f) {
112-
return Caml_splice_call.spliceObjApply([], "concat", [a.map(f)]);
119+
function keepSome(__x) {
120+
return filterMap(__x, (function (x) {
121+
return x;
122+
}));
123+
}
124+
125+
function findMap(arr, f) {
126+
var _i = 0;
127+
while(true) {
128+
var i = _i;
129+
if (i === arr.length) {
130+
return ;
131+
}
132+
var r = Curry._1(f, arr[i]);
133+
if (r !== undefined) {
134+
return r;
135+
}
136+
_i = i + 1 | 0;
137+
continue ;
138+
};
113139
}
114140

115141
export {
142+
make ,
143+
fromInitializer ,
116144
sort ,
117145
indexOfOpt ,
118146
lastIndexOfOpt ,
119147
reduce ,
120-
reduceReverse ,
121148
reduceWithIndex ,
149+
reduceRight ,
150+
reduceRightWithIndex ,
122151
findIndexOpt ,
123152
reverse ,
124153
filterMap ,
154+
keepSome ,
125155
shuffle ,
126156
shuffleInPlace ,
127-
flatMap ,
157+
findMap ,
128158
}
129159
/* No side effect */

‎src/Core__Array.res

Lines changed: 55 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@new external makeUninitializedUnsafe: int => array<'a> = "Array"
2+
@set external truncateToLengthUnsafe: (array<'a>, int) => unit = "length"
13
external getUnsafe: (array<'a>, int) => 'a = "%array_unsafe_get"
24
external setUnsafe: (array<'a>, int, 'a) => unit = "%array_unsafe_set"
35

@@ -11,6 +13,32 @@ external fromArrayLikeWithMap: (Js.Array2.array_like<'a>, 'a => 'b) => array<'b>
1113
@val external fromIterator: Core__Iterator.t<'a> => array<'a> = "Array.from"
1214
@val external fromIteratorWithMap: (Core__Iterator.t<'a>, 'a => 'b) => array<'b> = "Array.from"
1315

16+
@send external fillAllInPlace: (array<'a>, 'a) => unit = "fill"
17+
18+
@send external fillInPlaceToEnd: (array<'a>, 'a, ~start: int) => unit = "fill"
19+
20+
@send external fillInPlace: (array<'a>, 'a, ~start: int, ~end: int) => unit = "fill"
21+
22+
let make = (~length, x) =>
23+
if length <= 0 {
24+
[]
25+
} else {
26+
let arr = makeUninitializedUnsafe(length)
27+
arr->fillAllInPlace(x)
28+
arr
29+
}
30+
31+
let fromInitializer = (~length, f) =>
32+
if length <= 0 {
33+
[]
34+
} else {
35+
let arr = makeUninitializedUnsafe(length)
36+
for i in 0 to length - 1 {
37+
arr->setUnsafe(i, f(i))
38+
}
39+
arr
40+
}
41+
1442
@val external isArray: 'a => bool = "Array.isArray"
1543

1644
@get external length: array<'a> => int = "length"
@@ -23,12 +51,6 @@ external copyWithinToEnd: (array<'a>, ~target: int, ~start: int) => array<'a> =
2351
@send
2452
external copyWithin: (array<'a>, ~target: int, ~start: int, ~end: int) => array<'a> = "copyWithin"
2553

26-
@send external fillAllInPlace: (array<'a>, 'a) => unit = "fill"
27-
28-
@send external fillInPlaceToEnd: (array<'a>, 'a, ~start: int) => unit = "fill"
29-
30-
@send external fillInPlace: (array<'a>, 'a, ~start: int, ~end: int) => unit = "fill"
31-
3254
@send external pop: array<'a> => option<'a> = "pop"
3355

3456
@send external push: (array<'a>, 'a) => unit = "push"
@@ -105,35 +127,16 @@ let sort = (arr, cmp) => {
105127
@send external map: (array<'a>, 'a => 'b) => array<'b> = "map"
106128
@send external mapWithIndex: (array<'a>, ('a, int) => 'b) => array<'b> = "map"
107129

108-
let reduceU = (a, x, f) => {
109-
let r = ref(x)
110-
for i in 0 to length(a) - 1 {
111-
r.contents = f(. r.contents, getUnsafe(a, i))
112-
}
113-
r.contents
114-
}
115-
116-
let reduce = (a, x, f) => reduceU(a, x, (. a, b) => f(a, b))
117-
118-
let reduceWithIndexU = (a, x, f) => {
119-
let r = ref(x)
120-
for i in 0 to length(a) - 1 {
121-
r.contents = f(. r.contents, getUnsafe(a, i), i)
122-
}
123-
r.contents
124-
}
125-
126-
let reduceWithIndex = (a, x, f) => reduceWithIndexU(a, x, (. a, b, c) => f(a, b, c))
127-
128-
let reduceReverseU = (a, x, f) => {
129-
let r = ref(x)
130-
for i in length(a) - 1 downto 0 {
131-
r.contents = f(. r.contents, getUnsafe(a, i))
132-
}
133-
r.contents
134-
}
135-
136-
let reduceReverse = (a, x, f) => reduceReverseU(a, x, (. a, b) => f(a, b))
130+
@send external reduce: (array<'b>, ('a, 'b) => 'a, 'a) => 'a = "reduce"
131+
let reduce = (arr, init, f) => reduce(arr, f, init)
132+
@send external reduceWithIndex: (array<'b>, ('a, 'b, int) => 'a, 'a) => 'a = "reduce"
133+
let reduceWithIndex = (arr, init, f) => reduceWithIndex(arr, f, init)
134+
@send
135+
external reduceRight: (array<'b>, ('a, 'b) => 'a, 'a) => 'a = "reduceRight"
136+
let reduceRight = (arr, init, f) => reduceRight(arr, f, init)
137+
@send
138+
external reduceRightWithIndex: (array<'b>, ('a, 'b, int) => 'a, 'a) => 'a = "reduceRight"
139+
let reduceRightWithIndex = (arr, init, f) => reduceRightWithIndex(arr, f, init)
137140

138141
@send external some: (array<'a>, 'a => bool) => bool = "some"
139142
@send external someWithIndex: (array<'a>, ('a, int) => bool) => bool = "some"
@@ -151,8 +154,6 @@ let findIndexOpt = (array: array<'a>, finder: 'a => bool): option<int> =>
151154
| index => Some(index)
152155
}
153156

154-
@new external makeUninitializedUnsafe: int => array<'a> = "Array"
155-
@set external truncateToLengthUnsafe: (array<'a>, int) => unit = "length"
156157
let swapUnsafe = (xs, i, j) => {
157158
let tmp = getUnsafe(xs, i)
158159
setUnsafe(xs, i, getUnsafe(xs, j))
@@ -200,7 +201,22 @@ let filterMapU = (a, f) => {
200201

201202
let filterMap = (a, f) => filterMapU(a, (. a) => f(a))
202203

203-
// TODO: Change this implementation?
204-
let flatMap = (a, f) => []->concatMany(map(a, f))
204+
let keepSome = filterMap(_, x => x)
205+
206+
@send external flatMap: (array<'a>, 'a => array<'b>) => array<'b> = "flatMap"
207+
208+
let findMap = (arr, f) => {
209+
let rec loop = i =>
210+
if i == arr->length {
211+
None
212+
} else {
213+
switch f(getUnsafe(arr, i)) {
214+
| None => loop(i + 1)
215+
| Some(_) as r => r
216+
}
217+
}
218+
219+
loop(0)
220+
}
205221

206222
@send external at: (array<'a>, int) => option<'a> = "at"

‎src/Core__Array.resi

Lines changed: 72 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@
55
external fromArrayLikeWithMap: (Js.Array2.array_like<'a>, 'a => 'b) => array<'b> = "Array.from"
66
@val external fromIterator: Core__Iterator.t<'a> => array<'a> = "Array.from"
77
@val external fromIteratorWithMap: (Core__Iterator.t<'a>, 'a => 'b) => array<'b> = "Array.from"
8+
9+
/**
10+
`make(~length, init)`
11+
12+
Creates an array of length `length` initialized with the value of `init`.
13+
14+
```res example
15+
Array.make(~length=3, #apple) == [#apple, #apple, #apple]
16+
```
17+
*/
18+
let make: (~length: int, 'a) => array<'a>
19+
20+
/**
21+
`fromInitializer(~length, f)`
22+
23+
Creates an array of length `length` initialized with the value returned from `f ` for each index.
24+
25+
```res example
26+
Array.make(~length=3, i => i + 3) == [3, 4, 5]
27+
```
28+
*/
29+
let fromInitializer: (~length: int, int => 'a) => array<'a>
30+
831
@val external isArray: 'a => bool = "Array.isArray"
932
@get external length: array<'a> => int = "length"
1033
@send external copyAllWithin: (array<'a>, ~target: int) => array<'a> = "copyWithin"
@@ -57,37 +80,50 @@ let lastIndexOfOpt: (array<'a>, 'a) => option<int>
5780
@send external mapWithIndex: (array<'a>, ('a, int) => 'b) => array<'b> = "map"
5881

5982
/**
60-
`reduce(xs, init, f)`
83+
`reduce(xs, f, init)`
6184
6285
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.
6386
6487
```res example
65-
Array.reduce([2, 3, 4], 1, (a, b) => a + b) == 10
88+
Array.reduce([2, 3, 4], (a, b) => a + b, 1) == 10
89+
90+
Array.reduce(["a", "b", "c", "d"], (a, b) => a ++ b, "") == "abcd"
91+
```
92+
*/
93+
let reduce: (array<'a>, 'b, ('b, 'a) => 'b) => 'b
94+
95+
/**
96+
`reduceWithIndex(xs, f, init)`
97+
98+
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.
6699
67-
Array.reduce(["a", "b", "c", "d"], "", (a, b) => a ++ b) == "abcd"
100+
```res example
101+
Array.reduceWithIndex([1, 2, 3, 4], (acc, x, i) => acc + x + i, 0) == 16
68102
```
69103
*/
70-
let reduce: (array<'b>, 'a, ('a, 'b) => 'a) => 'a
104+
let reduceWithIndex: (array<'a>, 'b, ('b, 'a, int) => 'b) => 'b
71105

72106
/**
73-
`reduceReverse(xs, init, f)`
107+
`reduceRight(xs, f, init)`
74108
75109
Works like `Array.reduce`; except that function `f` is applied to each item of `xs` from the last back to the first.
76110
77111
```res example
78-
Array.reduceReverse(["a", "b", "c", "d"], "", (a, b) => a ++ b) == "dcba"
112+
Array.reduceRight(["a", "b", "c", "d"], (a, b) => a ++ b, "") == "dcba"
79113
```
80114
*/
81-
let reduceReverse: (array<'b>, 'a, ('a, 'b) => 'a) => 'a
115+
let reduceRight: (array<'a>, 'b, ('b, 'a) => 'b) => 'b
82116

83117
/**
84-
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.
118+
`reduceRightWithIndex(xs, f, init)`
119+
120+
Like `reduceRight`, but with an additional index argument on the callback function.
85121
86122
```res example
87-
Array.reduceWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16
123+
Array.reduceRightWithIndex([1, 2, 3, 4], (acc, x, i) => acc + x + i, 0) == 16
88124
```
89125
*/
90-
let reduceWithIndex: (array<'a>, 'b, ('b, 'a, int) => 'b) => 'b
126+
let reduceRightWithIndex: (array<'a>, 'b, ('b, 'a, int) => 'b) => 'b
91127

92128
@send external some: (array<'a>, 'a => bool) => bool = "some"
93129
@send external someWithIndex: (array<'a>, ('a, int) => bool) => bool = "some"
@@ -101,11 +137,35 @@ external setUnsafe: (array<'a>, int, 'a) => unit = "%array_unsafe_set"
101137
let findIndexOpt: (array<'a>, 'a => bool) => option<int>
102138
let reverse: array<'a> => array<'a>
103139
let filterMap: (array<'a>, 'a => option<'b>) => array<'b>
140+
141+
/**
142+
`keepSome(arr)`
143+
144+
Returns a new array containing `value` for all elements that are `Some(value)`
145+
and ignoring every value that is `None`
146+
147+
```res example
148+
Array.keepSome([Some(1), None, Some(3)]) == [1, 3]
149+
```
150+
*/
151+
let keepSome: array<option<'a>> => array<'a>
104152
let shuffle: array<'a> => array<'a>
105153
let shuffleInPlace: array<'a> => unit
106-
let flatMap: (array<'a>, 'a => array<'b>) => array<'b>
154+
@send external flatMap: (array<'a>, 'a => array<'b>) => array<'b> = "flatMap"
155+
156+
/**
157+
`findMap(arr, f)`
158+
159+
Calls `f` for each element and returns the first value from `f` that is `Some(_)`.
160+
Otherwise returns `None`
107161
108-
/**
162+
```res example
163+
Array.findMap([1, 2, 3], n => mod(n, 2) ? Some(n - 2) : None) == 0
164+
```
165+
*/
166+
let findMap: (array<'a>, 'a => option<'b>) => option<'b>
167+
168+
/**
109169
`at(array, index)`
110170
111171
Get an element by its index. Negative indices count backwards from the last item.

‎test/ArrayTests.mjs

Lines changed: 407 additions & 0 deletions
Large diffs are not rendered by default.

‎test/ArrayTests.res

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
open RescriptCore
2+
3+
let eq = (a, b) => a == b
4+
5+
Test.run(__POS_OF__("make"), Array.make(~length=6, 7), eq, [7, 7, 7, 7, 7, 7])
6+
7+
Test.run(
8+
__POS_OF__("fromInitializer"),
9+
Array.fromInitializer(~length=7, i => i + 3),
10+
eq,
11+
[3, 4, 5, 6, 7, 8, 9],
12+
)
13+
14+
Test.run(__POS_OF__("reduce"), Array.reduce([1, 2, 3], list{}, List.add), eq, list{3, 2, 1})
15+
Test.run(__POS_OF__("reduce - empty"), Array.reduce([], list{}, List.add), eq, list{})
16+
17+
Test.run(
18+
__POS_OF__("reduceWithIndex"),
19+
Array.reduceWithIndex([1, 2, 3], list{}, (acc, v, i) => list{v + i, ...acc}),
20+
eq,
21+
list{5, 3, 1},
22+
)
23+
Test.run(
24+
__POS_OF__("reduceWithIndex - empty"),
25+
Array.reduceWithIndex([], list{}, (acc, v, i) => list{v + i, ...acc}),
26+
eq,
27+
list{},
28+
)
29+
30+
Test.run(
31+
__POS_OF__("reduceRight"),
32+
Array.reduceRight([1, 2, 3], list{}, List.add),
33+
eq,
34+
list{1, 2, 3},
35+
)
36+
Test.run(__POS_OF__("reduceRight - empty"), Array.reduceRight([], list{}, List.add), eq, list{})
37+
38+
Test.run(
39+
__POS_OF__("reduceEightWithIndex"),
40+
Array.reduceRightWithIndex([1, 2, 3], list{}, (acc, v, i) => list{v + i, ...acc}),
41+
eq,
42+
list{1, 3, 5},
43+
)
44+
Test.run(
45+
__POS_OF__("reduceWithIndex - empty"),
46+
Array.reduceRightWithIndex([], list{}, (acc, v, i) => list{v + i, ...acc}),
47+
eq,
48+
list{},
49+
)
50+
51+
Test.run(__POS_OF__("shuffle - length"), Array.shuffle([1, 2, 3])->Array.length, eq, 3)
52+
53+
Test.run(
54+
__POS_OF__("shuffleInPlace - length"),
55+
{
56+
let arr = [1, 2, 3]
57+
Array.shuffleInPlace(arr)
58+
arr->Array.length
59+
},
60+
eq,
61+
3,
62+
)
63+
64+
Test.run(
65+
__POS_OF__("filterMap"),
66+
Array.filterMap([1, 2, 3, 4, 5, 6], n => mod(n, 2) == 0 ? Some(n * n) : None),
67+
eq,
68+
[4, 16, 36],
69+
)
70+
Test.run(__POS_OF__("filterMap - no match"), Array.filterMap([1, 2, 3, 4, 5, 6], _ => None), eq, [])
71+
Test.run(
72+
__POS_OF__("filterMap - empty"),
73+
Array.filterMap([], n => mod(n, 2) == 0 ? Some(n * n) : None),
74+
eq,
75+
[],
76+
)
77+
78+
Test.run(__POS_OF__("keepSome"), Array.keepSome([Some(1), None, Some(3)]), eq, [1, 3])
79+
Test.run(
80+
__POS_OF__("keepSome - all Some"),
81+
Array.keepSome([Some(1), Some(2), Some(3)]),
82+
eq,
83+
[1, 2, 3],
84+
)
85+
Test.run(__POS_OF__("keepSome - all None"), Array.keepSome([None, None, None]), eq, [])
86+
Test.run(__POS_OF__("keepSome - empty"), Array.keepSome([]), eq, [])
87+
88+
Test.run(
89+
__POS_OF__("findMap"),
90+
Array.findMap([1, 2, 3, 4, 5, 6], n => mod(n, 2) == 0 ? Some(n - 8) : None),
91+
eq,
92+
Some(-6),
93+
)
94+
Test.run(__POS_OF__("findMap - no match"), Array.findMap([1, 2, 3, 4, 5, 6], _ => None), eq, None)
95+
Test.run(
96+
__POS_OF__("findMap - empty"),
97+
Array.findMap([], n => mod(n, 2) == 0 ? Some(n * n) : None),
98+
eq,
99+
None,
100+
)

‎test/TestSuite.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Generated by ReScript, PLEASE EDIT WITH CARE
2+
3+
import * as ArrayTests from "./ArrayTests.mjs";
4+
import * as PromiseTest from "./PromiseTest.mjs";
5+
6+
var TestError = PromiseTest.TestError;
7+
8+
var fail = PromiseTest.fail;
9+
10+
var equal = PromiseTest.equal;
11+
12+
var Creation = PromiseTest.Creation;
13+
14+
var ThenChaining = PromiseTest.ThenChaining;
15+
16+
var Rejection = PromiseTest.Rejection;
17+
18+
var Catching = PromiseTest.Catching;
19+
20+
var Concurrently = PromiseTest.Concurrently;
21+
22+
var eq = ArrayTests.eq;
23+
24+
export {
25+
TestError ,
26+
fail ,
27+
equal ,
28+
Creation ,
29+
ThenChaining ,
30+
Rejection ,
31+
Catching ,
32+
Concurrently ,
33+
eq ,
34+
}
35+
/* ArrayTests Not a pure module */

‎test/TestSuite.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include PromiseTest
2+
include ArrayTests

0 commit comments

Comments
 (0)
Please sign in to comment.