File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,22 @@ var each = import("../../lib/js/belt_List.js").then(function (m) {
6
6
return m . forEach ;
7
7
} ) ;
8
8
9
+ function eachInt ( list , f ) {
10
+ var arg1 = function ( each ) {
11
+ return Promise . resolve ( Curry . _2 ( each , list , f ) ) ;
12
+ } ;
13
+ return each . then ( arg1 ) ;
14
+ }
15
+
9
16
var beltAsModule = import ( "../../lib/js/belt_List.js" ) ;
10
17
11
- async function eachInt ( list , f ) {
18
+ async function eachIntAsync ( list , f ) {
12
19
var each$1 = await each ;
13
20
return Curry . _2 ( each$1 , list , f ) ;
14
21
}
15
22
16
23
exports . each = each ;
17
- exports . beltAsModule = beltAsModule ;
18
24
exports . eachInt = eachInt ;
25
+ exports . beltAsModule = beltAsModule ;
26
+ exports . eachIntAsync = eachIntAsync ;
19
27
/* No side effect */
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ module type BeltList = module type of Belt.List
7
7
8
8
let beltAsModule = Js .import (module (Belt .List : BeltList ))
9
9
10
- let eachInt = async (list : list <int >, f : int => unit ) => {
10
+ let eachIntAsync = async (list : list <int >, f : int => unit ) => {
11
11
let each = await each
12
12
list -> each (f )
13
13
}
14
14
15
15
let eachLazy = () => Js .import (Belt .List .forEach )
16
16
17
- let eachInt = (list : list <int >, f : int => unit ) =>
17
+ let eachIntLazy = (list : list <int >, f : int => unit ) =>
18
18
eachLazy () |> Js .Promise .then_ (each => list -> each (f )-> Js .Promise .resolve )
You can’t perform that action at this time.
0 commit comments