add pair_of_list helper function
This commit is contained in:
parent
883d16a3a3
commit
8a9648ff3e
2 changed files with 5 additions and 4 deletions
|
@ -18,9 +18,10 @@ let set_of_string str =
|
|||
aux str ((String.length str) - 1) CS.empty
|
||||
|
||||
let map_pair f (a, b) = (f a, f b)
|
||||
|
||||
let curry f x y = f (x, y)
|
||||
let uncurry f (x, y) = f x y
|
||||
let uncurry3 f (x, y, z) = f x y z
|
||||
|
||||
let swap x y = y x
|
||||
|
||||
let pair_of_list l = (List.hd l, List.tl l |> List.hd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue