mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
add CCPair.make
This commit is contained in:
parent
1cf81c0031
commit
bb37ea469d
2 changed files with 6 additions and 0 deletions
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
type ('a,'b) t = ('a * 'b)
|
||||
|
||||
let make x y = x,y
|
||||
|
||||
let map1 f (x,y) = f x,y
|
||||
|
||||
let map2 f (x,y) = x,f y
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
|
||||
type ('a,'b) t = ('a * 'b)
|
||||
|
||||
val make : 'a -> 'b -> ('a, 'b) t
|
||||
(** Make a tuple from its components
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val map1 : ('a -> 'b) -> ('a * 'c) -> ('b * 'c)
|
||||
|
||||
val map2 : ('a -> 'b) -> ('c * 'a) -> ('c * 'b)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue