drop(while:)
Returns a subsequence by skipping elements while predicate returns true and returning the remaining elements.
Declaration
func drop(while predicate: (Self.Element) throws -> Bool) rethrows -> Self.SubSequenceParameters
- predicate:
A closure that takes an element of the sequence as its argument and returns
trueif the element should be skipped orfalseif it should be included. Once the predicate returnsfalseit will not be called again.