refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-29 16:37:28 +02:00
parent 094a32260b
commit f3e23ea642
5 changed files with 70 additions and 47 deletions
+2 -3
View File
@@ -199,9 +199,8 @@ function public.filter(t, p)
end
function public.map(t, f)
local mapped = M.t
for k, v in t do mapped[k] = f(v, k) end
return mapped
for k, v in t do t[k] = f(v, k) end
return t
end
function public.trim(str)