fun/array/symmetric-difference
Returns the symmetric difference of the given sets; that is, elements that included in either set, but not in their intersection. The sets may be anything that can be turned into an array with fun/array/to-array
.
Syntax
diff = symmetricDifference(a, b)
Parameters
a
,b
The sets used to determine the symmetric difference
Examples
symmetricDifference([0, 1, 2], [1, 2, 3]) // [0, 3]
symmetricDifference([1, 2, 3], [3, 4]) // [1, 2, 4]