Skip to main content

Mojo module

iter

Traits

  • Iterable: The Iterator trait describes a type that can be turned into an iterator.
  • Iterator: The Iterator trait describes a type that can be used as an iterator, e.g. in a for loop.

Functions

  • enumerate: The enumerate function returns an iterator that yields tuples of the index and the element of the original iterator.
  • iter:
  • map: Returns an iterator applies func to each element of the input iterable.
  • next:
  • zip: Returns an iterator that yields tuples of the elements of the original iterables.

Was this page helpful?