OxL Reference

method iter.next

Next element or none when the sequence is exhausted.

Example:

oxl✓ checked in CI
fn main() io {
  var it = [10, 20].iter()
  print("{it.next()} {it.next()} {it.next()}")
}
Output
10 20 none
pub(api) var fn next() -> T?

Complexity. O(1) plus the cost of the adapters behind it.

Since. 1.0.0-beta

Returns

T?

Effects

none declared (pure unless the body says otherwise)

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

See also