aboutsummaryrefslogtreecommitdiffstats
path: root/util/set.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/set.lua')
-rw-r--r--util/set.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/set.lua b/util/set.lua
index bb318adf..84bfe8c4 100644
--- a/util/set.lua
+++ b/util/set.lua
@@ -141,4 +141,8 @@ function intersection(set1, set2)
return set;
end
+function xor(set1, set2)
+ return union(set1, set2) - intersection(set1, set2);
+end
+
return _M;