Returns a subsequence containing the initial elements until
false and skipping the remaining elements.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- Xcode 11.0+
A closure that takes an element of the sequence as its argument and returns
trueif the element should be included or
falseif it should be excluded. Once the predicate returns
falseit will not be called again.
Complexity: O(n), where n is the length of the collection.