Открыть главное меню
Главная
Случайная
Войти
Настройки
Описание проекта «Информаторий»
Отказ от ответственности
in.wiki
Найти
Изменения
← Предыдущая правка
Следующая правка →
Модуль:RadicalWikifier
(посмотреть исходный код)
Версия от 21:12, 6 сентября 2023
22 байта добавлено
,
2 года назад
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)
Александр Машин
Бюрократы
, steward,
Администраторы
1714
правок