refactoring, bugfix

This commit is contained in:
Manuel Simon Hirsig
2016-11-09 02:08:45 +01:00
parent c7d2284b3d
commit 05fb051bd4
18 changed files with 109 additions and 99 deletions
-13
View File
@@ -34,19 +34,6 @@ function M.replicate(count, value)
if count > 0 then return value, replicate(count - 1, value) end
end
do
local state
local function f()
local temp = state
state = nil
return temp
end
function M.present(v)
state = v
return f
end
end
M.index = vararg-function(arg)
local t = tremove(arg, 1)
for i = 1, getn(arg) do t = t and t[arg[i]] end return t