refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-09-12 15:25:37 +02:00
parent ef991c8892
commit 44913ead9b
4 changed files with 10 additions and 5 deletions
+3 -2
View File
@@ -101,8 +101,9 @@ function public.vararg.partial(arg)
end)
end
function public.index(t, ...) auto[arg] = true
for i = 1, arg.n do t = t and t[arg[i]] end return t
function public.vararg.index(arg)
local t = tremove(arg, 1)
for i = 1, getn(arg) do t = t and t[arg[i]] end return t
end
public.huge = 1.8 * 10 ^ 308