Module Accessor_base__.Accessor_either
include sig ... end with type ('f, 's) t := ('f, 's) Base.Either.t
include module type of sig ... end
val first : ('a -> 'b -> 'c, 'a -> ('b, 'd) t -> ('c, 'd) t, [< Accessor_base__.Import.Accessor.variant ]) Accessor_base__.Import.Accessor.t
val second : ('a -> 'b -> 'c, 'a -> ('d, 'b) t -> ('d, 'c) t, [< Accessor_base__.Import.Accessor.variant ]) Accessor_base__.Import.Accessor.t
val swapped : ('i -> ('a, 'b) Base.Either.t -> ('c, 'd) Base.Either.t, 'i -> ('b, 'a) Base.Either.t -> ('d, 'c) Base.Either.t, [< Accessor_base__.Import.isomorphism ]) Accessor_base__.Import.Accessor.t
Access an either where the cases are swapped with each other.
val assocl : ('i -> (('a, 'b) Base.Either.t, 'c) Base.Either.t -> (('d, 'e) Base.Either.t, 'f) Base.Either.t, 'i -> ('a, ('b, 'c) Base.Either.t) Base.Either.t -> ('d, ('e, 'f) Base.Either.t) Base.Either.t, [< Accessor_base__.Import.isomorphism ]) Accessor_base__.Import.Accessor.t
val assocr : ('i -> ('a, ('b, 'c) Base.Either.t) Base.Either.t -> ('d, ('e, 'f) Base.Either.t) Base.Either.t, 'i -> (('a, 'b) Base.Either.t, 'c) Base.Either.t -> (('d, 'e) Base.Either.t, 'f) Base.Either.t, [< Accessor_base__.Import.isomorphism ]) Accessor_base__.Import.Accessor.t
module Index : sig ... end
val each : ('i -> 'a -> 'b, 'i -> ('a, 'a) Base.Either.t -> ('b, 'b) Base.Either.t, [< Accessor_base__.Import.field ]) Accessor_base__.Import.Accessor.t
Access the value stored by the either, regardless of which constructor it lives under. This value is guaranteed to exist, so this accessor is a field instead of a variant.
val eachi : ((Index.t * 'i) -> 'a -> 'b, 'i -> ('a, 'a) Base.Either.t -> ('b, 'b) Base.Either.t, [< Accessor_base__.Import.field ]) Accessor_base__.Import.Accessor.t
Like
each
, but also provides you with which constructor the value was under.
module First : Accessor_base__.Import.Accessor.Monad.S2 with type ('a, 'b) t := ('a, 'b) Base.Either.t
module Second : Accessor_base__.Import.Accessor.Monad.S2 with type ('a, 'b) t := ('b, 'a) Base.Either.t