Aliases
None.Arguments
function
required
The function to inspect or wrap.
Returns
function
A separate function closure referring to the captured state.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Clones a closure into a separate function object.
clonefunction(fn: function): function
local function twice(x) return x * 2 end
local copy = clonefunction(twice)
print(copy(4))
