Added lume.push(), updated tests

This commit is contained in:
rxi
2015-02-07 22:38:08 +00:00
parent 9cdbc27b66
commit 3bec7b356d
2 changed files with 20 additions and 0 deletions

View File

@@ -149,6 +149,15 @@ function lume.weightedchoice(t)
end
function lume.push(t, ...)
local n = select("#", ...)
for i = 1, n do
t[#t + 1] = select(i, ...)
end
return ...
end
function lume.shuffle(t)
local rtn = {}
for i = 1, #t do