-local ipairs, pairs, setmetatable, next, tostring =
+-- Prosody IM
+-- Copyright (C) 2008-2010 Matthew Wild
+-- Copyright (C) 2008-2010 Waqas Hussain
+--
+-- This project is MIT/X11 licensed. Please see the
+-- COPYING file in the source package for more information.
+--
+
+local ipairs, pairs, setmetatable, next, tostring =
ipairs, pairs, setmetatable, next, tostring;
local t_concat = table.concat;
end
end
+ function set:empty()
+ return not next(items);
+ end
+
if list then
set:add_list(list);
end
return set;
end
+function xor(set1, set2)
+ return union(set1, set2) - intersection(set1, set2);
+end
+
return _M;