Evaluates a given predicate against each object in the receiving set and returns a new set containing the objects for which the predicate returns true.
- iOS 3.0+
- macOS 10.5+
- tvOS 9.0+
- watchOS 2.0+
A new set containing the objects in the receiving set for which
predicate returns true.
The following example illustrates the use of this method.