Polishing

This commit is contained in:
Justin van der Leij 2018-01-30 12:45:35 +01:00
parent 58549d6b0a
commit 2d21fe97a5
8 changed files with 136 additions and 109 deletions

View file

@ -34,18 +34,17 @@ function List:remove(obj)
self.numerical[index] = other
self.named[other] = index
self.numerical[size] = nil
end
self.named[obj] = nil
self.size = size - 1
end
function List:get(i)
return self.numerical[i]
end
function List:getIndex(obj)
return self.named[obj]
function List:has(obj)
return self.named[obj] and true
end
return setmetatable(List, {