Skip to documentation
SplitScript
  • Language
  • Standard library
  • Guides
  • Migration

SplitScript reference / InclusiveRangeIterator / next

InclusiveRangeIterator.next

Method

InclusiveRangeIterator<T>.next() -> IteratorStep<T> where T: Integer

Advances to the next integer through the included endpoint.

The cursor returns the endpoint once before returning End.

Effects: allocates, mutates the receiver

Runtime behavior: available everywhere; synchronous

Examples

Advance an inclusive-range cursor

let iterator = (1..=3).iterator()
let step = iterator.next()
Generated from the SplitScript compiler's documentation catalogs.