Up

Module Tuple2 = Tuple.T2

Signature

type ('a, 'b) t = 'a * 'b
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> (Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> ('a, 'b) t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> ('b -> Sexplib.Sexp.t) -> ('a, 'b) t -> Sexplib.Sexp.t
val create : 'a -> 'b -> ('a, 'b) t
val curry : (('a, 'b) t -> 'c) -> 'a -> 'b -> 'c
val uncurry : ('a -> 'b -> 'c) -> ('a, 'b) t -> 'c
val compare : cmp1:('a -> 'a -> int) -> cmp2:('b -> 'b -> int) -> ('a, 'b) t -> ('a, 'b) t -> int
val equal : eq1:('a -> 'a -> bool) -> eq2:('b -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t -> bool
external get1 : ('a, _) t -> 'a = "%field0"
external get2 : (_, 'a) t -> 'a = "%field1"
val map1 : f:('a -> 'c) -> ('a, 'b) t -> ('c, 'b) t
val map2 : f:('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t
val map_fst : ('a, 'b) t -> f:('a -> 'c) -> ('c, 'b) t
val map_snd : ('a, 'b) t -> f:('b -> 'c) -> ('a, 'c) t
val swap : ('a, 'b) t -> ('b, 'a) t