This type represents values with two possibilities. Either
can be seen as a
generic sum type, the dual of Tuple
. First
is neither more important nor less
important than Second
.
include sig ... end
val hash_fold_t : (Base.Hash.state ‑> 'f ‑> Base.Hash.state) ‑> (Base.Hash.state ‑> 's ‑> Base.Hash.state) ‑> Base.Hash.state ‑> ('f, 's) t ‑> Base.Hash.state
val t_of_sexp : (Base.Sexp.t ‑> 'f) ‑> (Base.Sexp.t ‑> 's) ‑> Base.Sexp.t ‑> ('f, 's) t
val sexp_of_t : ('f ‑> Base.Sexp.t) ‑> ('s ‑> Base.Sexp.t) ‑> ('f, 's) t ‑> Base.Sexp.t
include Base.Invariant.S2 with type (a, b) t := (a, b) t
val invariant : 'a Base__.Invariant_intf.inv ‑> 'b Base__.Invariant_intf.inv ‑> ('a, 'b) t Base__.Invariant_intf.inv
val value : ('a, 'a) t ‑> 'a
val iter : ('a, 'b) t ‑> first:('a ‑> unit) ‑> second:('b ‑> unit) ‑> unit
val value_map : ('a, 'b) t ‑> first:('a ‑> 'c) ‑> second:('b ‑> 'c) ‑> 'c
module First : Base.Either_intf.Focused with type ('a, 'b) t = ('a, 'b) t
module Second : Base.Either_intf.Focused with type ('a, 'b) t = ('b, 'a) t
val is_first : (_, _) t ‑> bool
val is_second : (_, _) t ‑> bool
val second : 's ‑> (_, 's) t
module Export : sig ... end