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

SplitScript reference / SetIterator / next

SetIterator.next

Method

SetIterator<T>.next() -> IteratorStep<T> where T: Equatable

Advances to the next set element.

Structural set mutation invalidates this cursor.

Effects: allocates, mutates the receiver

Runtime behavior: available everywhere; synchronous

Examples

Advance a set cursor

let values = Set.new<String>()
let iterator = values.iterator()
let step = iterator.next()
Generated from the SplitScript compiler's documentation catalogs.