dropWhile(predicate: (Element) -> Bool) -> [Element]

Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate returns false.

Parameters

  • predicate: The function invoked per iteration.

Returns

Returns the new sliced array.

[1,2,3,4,5].dropWhile{ $0 < 3 }
// -> [3,4,5]