accessor_base

Accessors for Base types, for use with the Accessor library
IN THIS PACKAGE
val first : ( 'a -> 'b -> 'c, 'a -> ( 'd, 'e ) Base.Either.t -> ( 'f, 'g ) Base.Either.t, [< Accessor.variant ] ) Accessor.General.t
val second : ( 'a -> 'b -> 'c, 'a -> ( 'd, 'e ) Base.Either.t -> ( 'f, 'g ) Base.Either.t, [< Accessor.variant ] ) Accessor.General.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.General.t

Access an either where the cases are swapped with each other.

assocl and assocr reassociate nested eithers.

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.General.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.General.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.General.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.General.t

Like each, but also provides you with which constructor the value was under.

module First : Accessor.Monad.S2 with type ('a, 'b) t := ( 'a, 'b ) Base.Either.t
module Second : Accessor.Monad.S2 with type ('a, 'b) t := ( 'b, 'a ) Base.Either.t