refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-09 14:53:05 +02:00
parent 44d0b46aa8
commit a1edc53bfe
6 changed files with 64 additions and 79 deletions
+2 -11
View File
@@ -8,20 +8,11 @@ function public.pack(table, ...)
end
function public.unpack(array, ...)
local table, index = {}, {}
local table = {}
for i=1,arg.n do
table[arg[i]] = array[i]
tinsert(index, arg[i])
end
return table, index
end
function public.pick(indices, ...)
local t = {}
for _, index in indices do
tinsert(t, arg[index])
end
return unpack(t)
return table
end
function public.select(i, ...)