Is true when Difference is the symmetric difference of Set1 and
Set2. I.e., Difference contains all elements that are not in the
intersection of Set1 and Set2. The semantics is the same as the
sequence below (but the actual implementation requires only a
single scan).
ord_union(Set1, Set2, Union),
ord_intersection(Set1, Set2, Intersection),
ord_subtract(Union, Intersection, Difference).
For example:
?- ord_symdiff([1,2], [2,3], X).
X = [1,3].