Anonymous

Module:FunList: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 324: Line 324:
for _, item in pairs(self.mytable) do
for _, item in pairs(self.mytable) do
local key = keySelector(item)
local key = keySelector(item)
local value = valueSelector and valueSelector(item) or item
local value = item
if valueSelector then
value = valueSelector(item)  
end
 
if not lookup[key] then
if not lookup[key] then
lookup[key] = {}
lookup[key] = {}
2,875

edits