Change parameter order for filter and map

This commit is contained in:
NullBite 2022-03-20 22:01:28 -04:00
parent 42f3f96a19
commit 5c41c4d1d5
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -70,7 +70,7 @@ function unstring(input)
end
end
function map(table, func)
function map(func, table)
local t={}
for k, v in pairs(table) do
t[k]=func(v)
@ -78,7 +78,7 @@ function map(table, func)
return t
end
function filter(table, func)
function filter(func, table)
local t={}
for k, v in pairs(table) do
if func(v) then