diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/set.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/set.lua b/util/set.lua index 7e600ebd..69dfef5d 100644 --- a/util/set.lua +++ b/util/set.lua @@ -52,6 +52,15 @@ local function new(list) return items[item]; end + function set:contains_set(other_set) + for item in other_set do + if not self:contains(item) then + return false; + end + end + return true; + end + function set:items() return next, items; end |