Add func.curry_full

master
Lars Mueller 2021-07-03 11:55:14 +02:00
parent 7f05c5d07e
commit eb2db70201
1 changed files with 5 additions and 0 deletions

View File

@ -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