diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-10-29 13:00:08 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-10-29 13:00:30 -0700 |
| commit | 23abab4f809e8d4b825746580082292db700036b (patch) | |
| tree | 8eb95a3b781547abedadd08705a6e6291662737c /containers.lua | |
| parent | be1df7ccd3fb5352ca666129aee93c56b5b27b40 (diff) | |
Some cleanups and fixes, made the parser more permissive of prematurely
terminated files.
Diffstat (limited to 'containers.lua')
| -rw-r--r-- | containers.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/containers.lua b/containers.lua index ab8647e..8ab6c80 100644 --- a/containers.lua +++ b/containers.lua @@ -186,6 +186,13 @@ local _list_mt = { end return false end, + remove_1 = function(self, item) + for i, x in ipairs(self) do + if x == item then + remove(self, i) + end + end + end, index_of_1 = function(self, item) for i, x in ipairs(self) do if x == item then |
