diff --git a/trie.lua b/trie.lua index 1231fa1..3399b69 100644 --- a/trie.lua +++ b/trie.lua @@ -7,6 +7,8 @@ setfenv(1, _ENV) local metatable = {__index = _ENV} +-- Setting the metatable is fine as it does not contain single-character keys. +-- TODO (?) encapsulate in "root" field for better code quality? function new(table) return setmetatable(table or {}, metatable) end function insert(self, word, value, overwrite)