Difference between pages "Module:TableTools" and "Module:TableTools/sandbox"
(Difference between pages)
m (1 revision imported: Adding templates for portals) |
(Module Creation) |
||
Line 72: | Line 72: | ||
-- NaNs can't be table keys, and they are also unique, so we don't need to check existence. | -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. | ||
ret[#ret + 1] = v | ret[#ret + 1] = v | ||
− | + | elseif not exists[v] then | |
− | + | ret[#ret + 1] = v | |
− | + | exists[v] = true | |
− | |||
− | |||
end | end | ||
end | end |