---
title: EnumeratedSequence.Iterator
framework: swift
role: symbol
role_heading: Structure
path: swift/enumeratedsequence/iterator
---

# EnumeratedSequence.Iterator

The iterator for EnumeratedSequence.

## Declaration

```swift
@frozen struct Iterator
```

## Overview

Overview An instance of this iterator wraps a base iterator and yields successive Int values, starting at zero, along with the elements of the underlying base iterator. The following example enumerates the elements of an array: var iterator = ["foo", "bar"].enumerated().makeIterator() iterator.next() // (0, "foo") iterator.next() // (1, "bar") iterator.next() // nil To create an instance, call enumerated().makeIterator() on a sequence or collection.

## Topics

### Default Implementations

- [IteratorProtocol Implementations](swift/enumeratedsequence/iterator/iteratorprotocol-implementations.md)
- [Sequence Implementations](swift/enumeratedsequence/iterator/sequence-implementations.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Escapable](swift/escapable.md)
- [IteratorProtocol](swift/iteratorprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Sequence](swift/sequence.md)
