Module Base.Either

type ('f, 's) t =
| First of 'f
| Second of 's

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 t_of_sexp : (Base__.Sexplib.Sexp.t ‑> 'f) ‑> (Base__.Sexplib.Sexp.t ‑> 's) ‑> Base__.Sexplib.Sexp.t ‑> ('f, 's) t
val sexp_of_t : ('f ‑> Base__.Sexplib.Sexp.t) ‑> ('s ‑> Base__.Sexplib.Sexp.t) ‑> ('f, 's) t ‑> Base__.Sexplib.Sexp.t
val compare : ('f ‑> 'f ‑> int) ‑> ('s ‑> 's ‑> int) ‑> ('f, 's) t ‑> ('f, 's) t ‑> int
include Invariant.S2 with type (a, b) t := (a, b) t
type ('a, 'b) t
val swap : ('f, 's) t ‑> ('s, 'f) t
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
val map : ('a, 'b) t ‑> first:('a ‑> 'c) ‑> second:('b ‑> 'd) ‑> ('c, 'd) t
val equal : ('f ‑> 'f ‑> bool) ‑> ('s ‑> 's ‑> bool) ‑> ('f, 's) t ‑> ('f, 's) t ‑> bool
module First : Either_intf.Focused with type ('a, 'b) t = ('a, 'b) t
module Second : Either_intf.Focused with type ('a, 'b) t = ('b, 'a) t
val is_first : (_, _) t ‑> bool
val is_second : (_, _) t ‑> bool
val first : 'f ‑> ('f, _) t

first and second are First.return and Second.return.

val second : 's ‑> (_, 's) t
module Export : sig ... end