OxL Reference

method iter.skipWhile

The elements from the first one for which p is false on.

Example:

oxl✓ checked in CI
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>  F

Complexity. O(1) to build; discards the leading elements on the first pull.

Since. 1.0.0-beta

Parameters

NameType
pfn(T) -> bool F escaping

Returns

iter<T> F

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/iter.oxl:269

See also