Task
Given two sets A and B, compute 



(
A
∖
B
)
∪
(
B
∖
A
)
.


{\displaystyle (A\setminus B)\cup (B\setminus A).}



That is, enumerate the items that are in A or B but not both. This set is called the symmetric difference of A and B.

In other words: 



(
A
∪
B
)
∖
(
A
∩
B
)


{\displaystyle (A\cup B)\setminus (A\cap B)}

 (the set of items that are in at least one of A or B minus the set of items that are in both A and B).

Optionally, give the individual differences (



A
∖
B


{\displaystyle A\setminus B}

 and 



B
∖
A


{\displaystyle B\setminus A}

) as well.



Test cases
A = {John, Bob, Mary, Serena}
B = {Jim, Mary, John, Bob}



Notes
 If your code uses lists of items to represent sets then ensure duplicate items in lists are correctly handled. For example two lists representing sets of a = ["John", "Serena", "Bob", "Mary", "Serena"] and b = ["Jim", "Mary", "John", "Jim", "Bob"] should produce the result of just two strings: ["Serena", "Jim"], in any order.
 In the mathematical notation above A \ B gives the set of items in A that are not in B; A ∪ B gives the set of items in both A and B, (their union); and A ∩ B gives the set of items that are in both A and B (their intersection).


note
	description: "Summary description for {SYMETRIC_DIFFERENCE_EXAMPLE}."
	URI: "http://rosettacode.org/wiki/Symmetric_difference"
 
class
	SYMETRIC_DIFFERENCE_EXAMPLE
 
create
	make
 
feature {NONE} -- Initialization
 
	make
		local
			a,a1,b,b1: ARRAYED_SET [STRING]
		do
			create a.make (4)
			create b.make (4)
			a.compare_objects
			b.compare_objects
			a.put ("John")
			a.put ("Bob")
			a.put ("Mary")
			a.put ("Serena")
 
			create a1.make (4)
			a1.copy (a)
 
			b.put ("Jim")
			b.put ("Mary")
			b.put ("John")
			b.put ("Bob")
 
			create b1.make (4)
			b1.copy (b)
 
		    a1.subtract (b1)
		    b.subtract (a)
		    a1.merge (b)
		    across a1 as c loop
		    	print (" " + c.item)
		    end
		end
 
end