# Module Batteries_uni.Pair

    module Pair: BatPair

    type ('a, 'b) t = 'a * 'b

    val map : ('a -> 'b) -> 'a mappable -> 'b mappable

map a function across both values in a pair

    val compare : ?c1:('a -> 'a -> int) -> ?c2:('b -> 'b -> int) -> 'a * 'b -> 'a * 'b -> int

Compare two pairs in lexicographic order, possibly using custom comparators for the two fields

    val enum : 'a enumerable -> 'a BatEnum.t

builds a two-element enum of a pair

    val of_enum : 'a BatEnum.t -> 'a enumerable

builds a pair out of the first two values of an enum. Raises `Failure` if insufficient elements

    val print : ?first:string ->
           ?sep:string ->
           ?last:string ->
           ('a BatIO.output -> 'b -> unit) ->
           ('a BatIO.output -> 'c -> unit) -> 'a BatIO.output -> 'b * 'c -> unit

Prints a pair using given printing functions. The parameters `first`, `sep`, and `last` default to produce "(a,b)".

    val print2 : ('a BatIO.output -> 'b -> unit) -> 'a BatIO.output -> 'b * 'b -> unit

    include BatEnum.Enumerable

    include BatInterfaces.Mappable