setSymDifference

setSymDifference(set1, set2)

Try it yourself:


Find non-shared members with setSymDifference

setSymDifference(A, B) returns values that belong to exactly one of two sets. Shared values are removed.

Example

For {1,2,3} and {2,3,4}, the symmetric difference is {1,4}. Use setDifference for one directional exclusion and setIntersect to identify what was shared.

Caveats

Duplicates do not change set membership. Normalize sources with setDistinct, and use setUnion if both unique and shared values should be retained.

All functions