[back]

Uncurry

Implement the function

val uncurry : ('a -> 'b -> 'c) -> ('a * 'b) -> 'c

which is the inverse of curry, i.e., it converts a curried two-argument function into a function that takes a tuple as an argument.

Examples

let f x y = x + y
let g = uncurry f
let _ = assert (g (2, 3) = 5)