Removes the elements of the set that aren’t also in the given sequence.
- Xcode 8.3+
- Swift Standard Library
A sequence of elements.
othermust be finite.
In the following example, the elements of the
employees set that are not also members of the
neighbors set are removed. In particular, the names
"Diana" are removed.