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'st
val sexp_of_t : ('f ‑> Base__.Sexplib.Sexp.t) ‑> ('s ‑> Base__.Sexplib.Sexp.t) ‑> ('f'st ‑> Base__.Sexplib.Sexp.t
val compare : ('f ‑> 'f ‑> int) ‑> ('s ‑> 's ‑> int) ‑> ('f'st ‑> ('f'st ‑> int
include Base.Invariant.S2 with type (a, b) t := (a, b) t
type ('a, 'b) t
val swap : ('f'st ‑> ('s'ft
val value : ('a'at ‑> 'a
val iter : ('a'bt ‑> first:('a ‑> unit) ‑> second:('b ‑> unit) ‑> unit
val value_map : ('a'bt ‑> first:('a ‑> 'c) ‑> second:('b ‑> 'c) ‑> 'c
val map : ('a'bt ‑> first:('a ‑> 'c) ‑> second:('b ‑> 'd) ‑> ('c'dt
val equal : ('f ‑> 'f ‑> bool) ‑> ('s ‑> 's ‑> bool) ‑> ('f'st ‑> ('f'st ‑> bool
module First : Base.Either_intf.Focused with type ('a, 'b) t = ('a'bt
module Second : Base.Either_intf.Focused with type ('a, 'b) t = ('b'at
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 ‑> (_'st
module Export : sig ... end