---
title: AnyCollection.Iterator
framework: swift
role: symbol
role_heading: Type Alias
path: swift/anycollection/iterator
---

# AnyCollection.Iterator

A type that provides the collection’s iteration interface and encapsulates its iteration state.

## Declaration

```swift
typealias Iterator = AnyIterator<Element>
```

## Discussion

Discussion By default, a collection conforms to the Sequence protocol by supplying IndexingIterator as its associated Iterator type.
