Returns a new set with the elements that are common to both this set and the given sequence.
- Xcode 8.0+
- Swift Standard Library
A new set.
In the following example, the
both set is made up of the elements that are in both the
neighbors sets. Elements that are in only one or the other are left out of the result of the intersection.