Skip to main content

Mojo function

next

next[IteratorType: Iterator](mut iterator: IteratorType) -> IteratorType.Element

Advances the iterator and returns the next element.

Parameters:

  • IteratorType (Iterator): The type of the iterator.

Args:

  • iterator (IteratorType): The iterator to advance.

Returns:

IteratorType.Element: The next element from the iterator.

Was this page helpful?