@@ -30,7 +30,7 @@ type 'a array_iter = 'a array_like
30
30
*)
31
31
32
32
external from : 'a array_like -> 'b array = " Array.from" [@@ bs.val] (* * ES2015 *)
33
- external fromMap : 'a array_like -> ('a -> 'b [@ bs]) -> 'b array = " Array.from" [@@ bs.val] (* * ES2015 *)
33
+ external fromMap : 'a array_like -> ('a -> 'b [@ bs.uncurry ]) -> 'b array = " Array.from" [@@ bs.val] (* * ES2015 *)
34
34
external isArray : 'a -> Js .boolean = " Array.isArray" [@@ bs.val] (* * ES2015 *)
35
35
(* Array.of: seems pointless unless you can bind *) (* * ES2015 *)
36
36
@@ -57,7 +57,7 @@ external reverseInPlace : 'this = "reverse" [@@bs.send.pipe: 'a t as 'this]
57
57
external shift : 'a Js .undefined = " " [@@ bs.send.pipe: 'a t as 'this ]
58
58
59
59
external sortInPlace : 'this = " sort" [@@ bs.send.pipe: 'a t as 'this ]
60
- external sortInPlaceWith : ('a -> 'a -> int [@ bs]) -> 'this = " sort" [@@ bs.send.pipe: 'a t as 'this ]
60
+ external sortInPlaceWith : ('a -> 'a -> int [@ bs.uncurry ]) -> 'this = " sort" [@@ bs.send.pipe: 'a t as 'this ]
61
61
62
62
external spliceInPlace : pos :int -> remove :int -> add :('a array ) -> 'this = " splice" [@@ bs.send.pipe: 'a t as 'this ] [@@ bs.splice]
63
63
external removeFromInPlace : pos :int -> 'this = " splice" [@@ bs.send.pipe: 'a t as 'this ]
@@ -106,37 +106,37 @@ external toLocaleString : string = "" [@@bs.send.pipe: 'a t as 'this]
106
106
external entries : (int * 'a) array_iter = "" [@@bs.send.pipe: 'a t as 'this] (* * ES2015 *)
107
107
*)
108
108
109
- external every : ('a -> Js .boolean [@ bs]) -> Js .boolean = " " [@@ bs.send.pipe: 'a t as 'this ]
110
- external everyi : ('a -> int -> Js .boolean [@ bs]) -> Js .boolean = " every" [@@ bs.send.pipe: 'a t as 'this ]
109
+ external every : ('a -> bool [@ bs.uncurry ]) -> Js .boolean = " " [@@ bs.send.pipe: 'a t as 'this ]
110
+ external everyi : ('a -> int -> bool [@ bs.uncurry ]) -> Js .boolean = " every" [@@ bs.send.pipe: 'a t as 'this ]
111
111
112
112
(* * should we use [bool] or [boolan] seems they are intechangeable here *)
113
- external filter : ('a -> bool [@ bs]) -> 'this = " " [@@ bs.send.pipe: 'a t as 'this ]
114
- external filteri : ('a -> int -> Js .boolean [@ bs]) -> 'this = " filter" [@@ bs.send.pipe: 'a t as 'this ]
113
+ external filter : ('a -> bool [@ bs.uncurry ]) -> 'this = " " [@@ bs.send.pipe: 'a t as 'this ]
114
+ external filteri : ('a -> int -> bool [@ bs.uncurry ]) -> 'this = " filter" [@@ bs.send.pipe: 'a t as 'this ]
115
115
116
- external find : ('a -> bool [@ bs]) -> 'a Js .undefined = " " [@@ bs.send.pipe: 'a t as 'this ] (* * ES2015 *)
117
- external findi : ('a -> int -> bool [@ bs]) -> 'a Js .undefined = " find" [@@ bs.send.pipe: 'a t as 'this ] (* * ES2015 *)
116
+ external find : ('a -> bool [@ bs.uncurry ]) -> 'a Js .undefined = " " [@@ bs.send.pipe: 'a t as 'this ] (* * ES2015 *)
117
+ external findi : ('a -> int -> bool [@ bs.uncurry ]) -> 'a Js .undefined = " find" [@@ bs.send.pipe: 'a t as 'this ] (* * ES2015 *)
118
118
119
- external findIndex : ('a -> bool [@ bs]) -> int = " " [@@ bs.send.pipe: 'a t as 'this ] (* * ES2015 *)
120
- external findIndexi : ('a -> int -> bool [@ bs]) -> int = " findIndex" [@@ bs.send.pipe: 'a t as 'this ] (* * ES2015 *)
119
+ external findIndex : ('a -> bool [@ bs.uncurry ]) -> int = " " [@@ bs.send.pipe: 'a t as 'this ] (* * ES2015 *)
120
+ external findIndexi : ('a -> int -> bool [@ bs.uncurry ]) -> int = " findIndex" [@@ bs.send.pipe: 'a t as 'this ] (* * ES2015 *)
121
121
122
- external forEach : ('a -> unit [@ bs]) -> unit = " " [@@ bs.send.pipe: 'a t as 'this ]
123
- external forEachi : ('a -> int -> unit [@ bs]) -> unit = " forEach" [@@ bs.send.pipe: 'a t as 'this ]
122
+ external forEach : ('a -> unit [@ bs.uncurry ]) -> unit = " " [@@ bs.send.pipe: 'a t as 'this ]
123
+ external forEachi : ('a -> int -> unit [@ bs.uncurry ]) -> unit = " forEach" [@@ bs.send.pipe: 'a t as 'this ]
124
124
125
125
(* commented out until bs has a plan for iterators
126
126
external keys : int array_iter = "" [@@bs.send.pipe: 'a t as 'this] (* * ES2015 *)
127
127
*)
128
128
129
- external map : ('a -> 'b [@ bs]) -> 'b t = " " [@@ bs.send.pipe: 'a t as 'this ]
130
- external mapi : ('a -> int -> 'b [@ bs]) -> 'b t = " map" [@@ bs.send.pipe: 'a t as 'this ]
129
+ external map : ('a -> 'b [@ bs.uncurry ]) -> 'b t = " " [@@ bs.send.pipe: 'a t as 'this ]
130
+ external mapi : ('a -> int -> 'b [@ bs.uncurry ]) -> 'b t = " map" [@@ bs.send.pipe: 'a t as 'this ]
131
131
132
- external reduce : ('b -> 'a -> 'b [@ bs]) -> 'b -> 'b = " " [@@ bs.send.pipe: 'a t as 'this ]
133
- external reducei : ('b -> 'a -> int -> 'b [@ bs]) -> 'b -> 'b = " reduce" [@@ bs.send.pipe: 'a t as 'this ]
132
+ external reduce : ('b -> 'a -> 'b [@ bs.uncurry ]) -> 'b -> 'b = " " [@@ bs.send.pipe: 'a t as 'this ]
133
+ external reducei : ('b -> 'a -> int -> 'b [@ bs.uncurry ]) -> 'b -> 'b = " reduce" [@@ bs.send.pipe: 'a t as 'this ]
134
134
135
- external reduceRight : ('b -> 'a -> 'b [@ bs]) -> 'b -> 'b = " " [@@ bs.send.pipe: 'a t as 'this ]
136
- external reduceRighti : ('b -> 'a -> int -> 'b [@ bs]) -> 'b -> 'b = " reduceRight" [@@ bs.send.pipe: 'a t as 'this ]
135
+ external reduceRight : ('b -> 'a -> 'b [@ bs.uncurry ]) -> 'b -> 'b = " " [@@ bs.send.pipe: 'a t as 'this ]
136
+ external reduceRighti : ('b -> 'a -> int -> 'b [@ bs.uncurry ]) -> 'b -> 'b = " reduceRight" [@@ bs.send.pipe: 'a t as 'this ]
137
137
138
- external some : ('a -> Js .boolean [@ bs]) -> Js .boolean = " " [@@ bs.send.pipe: 'a t as 'this ]
139
- external somei : ('a -> int -> Js .boolean [@ bs]) -> Js .boolean = " some" [@@ bs.send.pipe: 'a t as 'this ]
138
+ external some : ('a -> bool [@ bs.uncurry ]) -> Js .boolean = " " [@@ bs.send.pipe: 'a t as 'this ]
139
+ external somei : ('a -> int -> bool [@ bs.uncurry ]) -> Js .boolean = " some" [@@ bs.send.pipe: 'a t as 'this ]
140
140
141
141
(* commented out until bs has a plan for iterators
142
142
external values : 'a array_iter = "" [@@bs.send.pipe: 'a t as 'this] (* * ES2015 *)
0 commit comments