File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ external id : 'a -> 'a = "%identity"
19
19
let const v = fun _ -> v
20
20
21
21
(* * Functor interface *)
22
- let map f = bimap id f
22
+ let map f = bimap f id
23
23
let (< $> ) = map
24
- let mapLeft f = bimap f id
24
+ let mapError f = bimap id f
25
25
26
26
(* * Predicates *)
27
27
let isOk v = result (const true ) (const false ) v
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ val error : 'b -> ('a, 'b) t
7
7
8
8
val result : ('a -> 'c ) -> ('b -> 'c ) -> ('a , 'b ) t -> 'c
9
9
10
- val map : ('b -> 'c ) -> ('a , 'b ) t -> ('a , 'c ) t
11
- val (< $> ) : ('b -> 'c) -> ('a, 'b) t -> ('a , 'c ) t
12
- val mapLeft : ('a -> 'c ) -> ('a , 'b ) t -> ('c , 'b ) t
10
+ val map : ('a -> 'c ) -> ('a , 'b ) t -> ('c , 'b ) t
11
+ val (< $> ) : ('a -> 'c) -> ('a, 'b) t -> ('c , 'b ) t
12
+ val mapError : ('b -> 'c ) -> ('a , 'b ) t -> ('a , 'c ) t
13
13
14
14
val bimap : ('a -> 'c ) -> ('b -> 'd ) -> ('a , 'b ) t -> ('c , 'd ) t
15
15
You can’t perform that action at this time.
0 commit comments