OxL Справочник OxL
РусскийEnglish

method iter.next

Next element or none when the sequence is exhausted.

Example:

oxl✓ проверяется в CI
fn main() io {
  var it = [10, 20].iter()
  print("{it.next()} {it.next()} {it.next()}")
}
Вывод
10 20 none
pub(api) var fn next() -> T?

Сложность. O(1) plus the cost of the adapters behind it.

С версии. 1.0.0-beta

Возвращает

T?

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/iter.oxl:93

См. также