module Tuple2: BatTuple.Tuple2
type('a, 'b)
t ='a * 'b
val make : 'a -> 'b -> 'a * 'b
val first : 'a * 'b -> 'a
Equivalent to Pervasives.fst
.
val second : 'a * 'b -> 'b
Equivalent to Pervasives.snd
.
val swap : 'a * 'b -> 'b * 'a
val map : ('a -> 'c) -> ('b -> 'd) -> 'a * 'b -> 'c * 'd
Equivalent to BatPervasives.
(***) |
.
val mapn : ('a -> 'b) -> 'a * 'a -> 'b * 'b
Like BatTuple.Tuple2.map
but specialized for tuples with elements of the
same type.
mapn f
is equivalent to map f f
.
val map1 : ('a -> 'c) -> 'a * 'b -> 'c * 'b
map1 f (x,y)
returns (f x,y)
val map2 : ('b -> 'c) -> 'a * 'b -> 'a * 'c
map2 f (x,y)
returns (x,f y)
val curry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c
val uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c
val enum : 'a enumerable -> 'a BatEnum.t
val of_enum : 'a BatEnum.t -> 'a enumerable
Failure
if enum does not contain at least 2
elements.val print : ?first:string ->
?sep:string ->
?last:string ->
('o BatIO.output -> 'a -> unit) ->
('o BatIO.output -> 'b -> unit) -> 'o BatIO.output -> 'a * 'b -> unit
val printn : ?first:string ->
?sep:string ->
?last:string ->
('o BatIO.output -> 'a -> unit) -> 'o BatIO.output -> 'a * 'a -> unit
val compare : ?cmp1:('a -> 'a -> int) ->
?cmp2:('b -> 'b -> int) -> 'a * 'b -> 'a * 'b -> int
include BatEnum.Enumerable
val eq : 'a BatOrd.eq -> 'b BatOrd.eq -> ('a * 'b) BatOrd.eq
val ord : 'a BatOrd.ord -> 'b BatOrd.ord -> ('a * 'b) BatOrd.ord
val comp : 'a BatOrd.comp -> 'b BatOrd.comp -> ('a * 'b) BatOrd.comp
module Eq:
module Ord:
module Comp: