Изменения

memoize recursive
Строка 155: Строка 155:     
-- If there is only one child node, and it can be safely assimilated into the parent node:
 
-- If there is only one child node, and it can be safely assimilated into the parent node:
local assimilate = memoize (function (node)
+
local function assimilate (node)
 
if #node ~=  1 or node.__name == 'a' then
 
if #node ~=  1 or node.__name == 'a' then
 
return node
 
return node
Строка 177: Строка 177:  
end
 
end
 
return node
 
return node
end)
+
end
 +
assimilate = memoize (assimilate)
    
local function quoted (quote)
 
local function quoted (quote)