filter(_:)
Returns a new SyntaxCollection
that just contains the elements satisfying the given predicate.
func filter(_ isIncluded: (Element) throws -> Bool) rethrows -> Self
Parameters
- isIncluded
A closure that takes an element of the collection as its argument and returns a Boolean value indicating whether the element should be included in the returned collection.
Returns
A SyntaxCollection
of the elements that isIncluded
allowed.