Compile function with variable arguments