Ocaml - writing a function who's number of arguments is determined at runtime

I want to write a function f, that takes n arguments, where n is determined at runtime, and might vary at every call to the function, for example let's say our function f takes an integer n which i...