Skip to main content

Mojo function

iter

iter[IterableType: Iterable](ref iterable: IterableType) -> IterableType.IteratorType[iterable_is_mut, iterable_is_origin]

Constructs an iterator from an iterable.

Parameters:

  • IterableType (Iterable): The type of the iterable.

Args:

  • iterable (IterableType): The iterable to construct the iterator from.

Returns:

IterableType.IteratorType: An iterator for the given iterable.

Was this page helpful?