mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 09:13:53 +01:00
Add func.call_by_value
This commit is contained in:
parent
2005754a46
commit
0d1c5596a6
5
func.lua
5
func.lua
@ -34,3 +34,8 @@ function assert(value, callback)
|
||||
error(callback())
|
||||
end
|
||||
end
|
||||
|
||||
--+ Calls func using the provided arguments, deepcopies all arguments
|
||||
function call_by_value(func, ...)
|
||||
return func(unpack(modlib.table.deepcopy{...}))
|
||||
end
|
Loading…
Reference in New Issue
Block a user