Either.Bifunctor
type ('a, 'b) t = ('a, 'b) t
The type held by the Bifunctor
Bifunctor
val bimap : ('a -> 'b) -> ('c -> 'd) -> ('a, 'c) t -> ('b, 'd) t
Mapping over both arguments at the same time.
val map_fst : ('a -> 'b) -> ('a, 'c) t -> ('b, 'c) t
Mapping over the first argument.
val map_snd : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t
Mapping over the second argument.
val replace_fst : 'a -> ('b, 'c) t -> ('a, 'c) t
Create a new ('a, 'b) t, replacing all values in the ('c, 'b) t by given a value of 'a.
('a, 'b) t
('c, 'b) t
'a
val replace_snd : 'a -> ('b, 'c) t -> ('b, 'a) t
Create a new ('b, 'a) t, replacing all values in the ('b, 'c) t by given a value of 'a.
('b, 'a) t
('b, 'c) t