method iter.skip
A sequence without the first n elements (a negative n counts as 0).
Example:
fn main() io {
print("{[1, 2, 3, 4].iter().skip(2).collect()}")
}Output
[3, 4]
pub(api) move fn skip<I>(n: I) -> iter<T>Complexity. O(1) to build; the first pull discards `n` elements.
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
n | I |
Returns
iter<T>
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/iter.oxl:219