mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-29 10:43:43 +01:00
Add func.curry_full
This commit is contained in:
parent
7f05c5d07e
commit
eb2db70201
5
func.lua
5
func.lua
@ -17,6 +17,11 @@ function curry_tail(func, ...)
|
||||
return function(...) return func(unpack(modlib.table.concat({...}, args))) end
|
||||
end
|
||||
|
||||
function curry_full(func, ...)
|
||||
local args = { ... }
|
||||
return function() return func(unpack(args)) end
|
||||
end
|
||||
|
||||
function args(...)
|
||||
local args = { ... }
|
||||
return function(func) return func(unpack(args)) end
|
||||
|
Loading…
Reference in New Issue
Block a user