2,875
edits
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 | local value = item | ||
if valueSelector then | |||
value = valueSelector(item) | |||
end | |||
if not lookup[key] then | if not lookup[key] then | ||
lookup[key] = {} | lookup[key] = {} |
edits