OxL Reference

fn skip

Everything but the first n elements.

Example:

oxl✓ checked in CI
use std.stream { skip }

fn nums() -> stream<i32> {
  for i in 1..=5 { yield i }
}

fn main() io {
  var out: List<i32> = []
  for await x in nums() |> skip(3) { out.push(x) }
  print("{out}")
}
Output
[4, 5]
pub(api) fn skip<T, E>(s: stream<T, E>, n: usize) -> stream<T, E>

Since. 1.0.0-beta

Parameters

NameType
sstream<T, E>
nusize

Returns

stream<T, E>

Effects

none declared (pure unless the body says otherwise)

Defined in: std/stream/stream.oxl:135

See also