refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-24 00:23:59 +02:00
parent bf557e9c98
commit bdc3d1bc33
5 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ do
function public.modifier(f)
local function apply(_, value) return f(value) end
return setmetatable(t, {
__call=apply, __sub=apply, __newindex=function(_, _, value) return f(value) end,
__call=apply, __sub=apply, __pow=apply, __newindex=function(_, _, value) return f(value) end,
})
end
local temp, perm = modifier(function(t) transient[t] = true end), modifier(function(t) transient[t] = nil; return t end)