[back]

Uncurry 3

Implement the function

val uncurry3 : ('a -> 'b -> 'c -> 'd) -> ('a * 'b * 'c) -> 'd

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

Examples

let f x y z = x + y + z
let g = uncurry3 f
let _ = assert (g (1, 2, 3) = 6)