For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
reversed
reversed[T: ReversibleRange](value: T) -> _StridedRange
Get a reversed iterator of the input range.
Note: iterators are currently non-raising.
Parameters:
- T (
ReversibleRange): The type conforming to ReversibleRange.
Args:
- value (
T): The range to get the reversed iterator of.
Returns:
_StridedRange: The reversed iterator of the range.
reversed[T: Copyable](ref value: List[T]) -> _ListIter[T, origin_of(value), False]
Get a reversed iterator of the input list.
Note: iterators are currently non-raising.
Parameters:
- T (
Copyable): The type of the elements in the list.
Args:
- value (
List[T]): The list to get the reversed iterator of.
Returns:
_ListIter[T, origin_of(value), False]: The reversed iterator of the list.
reversed[T: Copyable, size: Int](ref value: InlineArray[T, size]) -> _InlineArrayIter[T, size, origin_of(value), False]
Get a reversed iterator of the input array.
Note: iterators are currently non-raising.
Parameters:
Args:
- value (
InlineArray[T, size]): The array to get the reversed iterator of.
Returns:
_InlineArrayIter[T, size, origin_of(value), False]: The reversed iterator of the array.
reversed[T: Copyable & ImplicitlyDestructible](ref value: Deque[T]) -> _DequeIter[T, origin_of(value), False]
Get a reversed iterator of the deque.
Note: iterators are currently non-raising.
Parameters:
- T (
Copyable&ImplicitlyDestructible): The type of the elements in the deque.
Args:
- value (
Deque[T]): The deque to get the reversed iterator of.
Returns:
_DequeIter[T, origin_of(value), False]: The reversed iterator of the deque.
reversed[K: KeyElement, V: Copyable & ImplicitlyDestructible, H: Hasher](ref value: Dict[K, V, H]) -> _DictKeyIter[K, V, H, origin_of(value), False]
Get a reversed iterator of the input dict.
Note: iterators are currently non-raising.
Parameters:
- K (
KeyElement): The type of the keys in the dict. - V (
Copyable&ImplicitlyDestructible): The type of the values in the dict. - H (
Hasher): The type of the hasher in the dict.
Args:
- value (
Dict[K, V, H]): The dict to get the reversed iterator of.
Returns:
_DictKeyIter[K, V, H, origin_of(value), False]: The reversed iterator of the dict keys.
reversed[dict_mutability: Bool, //, K: KeyElement, V: Copyable & ImplicitlyDestructible, H: Hasher, dict_origin: Origin[mut=dict_mutability]](ref value: _DictValueIter[K, V, H, dict_origin]) -> _DictValueIter[K, V, H, dict_origin, False]
Get a reversed iterator of the input dict values.
Note: iterators are currently non-raising.
Parameters:
- dict_mutability (
Bool): Whether the reference to the dict values is mutable. - K (
KeyElement): The type of the keys in the dict. - V (
Copyable&ImplicitlyDestructible): The type of the values in the dict. - H (
Hasher): The type of the hasher in the dict. - dict_origin (
Origin[mut=dict_mutability]): The origin of the dict values.
Args:
- value (
_DictValueIter[K, V, H, dict_origin]): The dict values to get the reversed iterator of.
Returns:
_DictValueIter[K, V, H, dict_origin, False]: The reversed iterator of the dict values.
reversed[dict_mutability: Bool, //, K: KeyElement, V: Copyable & ImplicitlyDestructible, H: Hasher, dict_origin: Origin[mut=dict_mutability]](ref value: _DictEntryIter[K, V, H, dict_origin]) -> _DictEntryIter[K, V, H, dict_origin, False]
Get a reversed iterator of the input dict items.
Note: iterators are currently non-raising.
Parameters:
- dict_mutability (
Bool): Whether the reference to the dict items is mutable. - K (
KeyElement): The type of the keys in the dict. - V (
Copyable&ImplicitlyDestructible): The type of the values in the dict. - H (
Hasher): The type of the hasher in the dict. - dict_origin (
Origin[mut=dict_mutability]): The origin of the dict items.
Args:
- value (
_DictEntryIter[K, V, H, dict_origin]): The dict items to get the reversed iterator of.
Returns:
_DictEntryIter[K, V, H, dict_origin, False]: The reversed iterator of the dict items.
reversed[T: Copyable](value: Span[T]) -> _SpanIter[T, value.origin, False]
Get a reversed iterator of the input Span.
Note: iterators are currently non-raising.
Parameters:
- T (
Copyable): The type of the elements in the Span.
Args:
- value (
Span[T]): The Span to get the reversed iterator of.
Returns:
_SpanIter[T, value.origin, False]: The reversed iterator of the Span.