Add func.curry_full

This commit is contained in:
Lars Mueller 2021-07-03 11:55:14 +02:00
parent 7f05c5d07e
commit eb2db70201

@ -17,6 +17,11 @@ function curry_tail(func, ...)
return function(...) return func(unpack(modlib.table.concat({...}, args))) end return function(...) return func(unpack(modlib.table.concat({...}, args))) end
end end
function curry_full(func, ...)
local args = { ... }
return function() return func(unpack(args)) end
end
function args(...) function args(...)
local args = { ... } local args = { ... }
return function(func) return func(unpack(args)) end return function(func) return func(unpack(args)) end