Assuming f is a function, just do
local env = {}
env['args'] = {...}
setfenv(f, env)
return f()