package accessor_base
Module Accessor_base.EitherSource
include sig ... end
include sig ... end
Source
val first :
('a ->
'b ->
'c,
'a ->
('b, 'd) Base.Either.t ->
('c, 'd) Base.Either.t,
[< Accessor.variant ])
Accessor.General.tSource
val second :
('a ->
'b ->
'c,
'a ->
('d, 'b) Base.Either.t ->
('d, 'c) Base.Either.t,
[< Accessor.variant ])
Accessor.General.tSource
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.tAccess an either where the cases are swapped with each other.
assocl and assocr reassociate nested eithers.
Source
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.tSource
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.tSource
val each :
('i ->
'a ->
'b,
'i ->
('a, 'a) Base.Either.t ->
('b, 'b) Base.Either.t,
[< Accessor_base__.Import.field ])
Accessor.General.tAccess 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.
Source
val eachi :
((Index.t * 'i) ->
'a ->
'b,
'i ->
('a, 'a) Base.Either.t ->
('b, 'b) Base.Either.t,
[< Accessor_base__.Import.field ])
Accessor.General.tLike each, but also provides you with which constructor the value was under.