method iter.skipWhile
The elements from the first one for which p is false on.
Example:
fn main() io {
print("{[1, 2, 5, 1].iter().skipWhile(x => x < 3).collect()}")
}Output
[5, 1]
pub(api) move fn skipWhile<effect F>(p: fn(T) -> bool F escaping) -> iter<T> FComplexity. O(1) to build; discards the leading elements on the first pull.
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
p | fn(T) -> bool F escaping |
Returns
iter<T> F
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/iter.oxl:269