mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 20:33:54 -04:00
Polishing
This commit is contained in:
parent
58549d6b0a
commit
2d21fe97a5
8 changed files with 136 additions and 109 deletions
|
@ -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, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue