---
title: IteratorSequence
framework: swift
role: symbol
role_heading: Structure
path: swift/iteratorsequence
---

# IteratorSequence

A sequence built around an iterator of type Base.

## Declaration

```swift
@frozen struct IteratorSequence<Base> where Base : IteratorProtocol
```

## Overview

Overview Useful mostly to recover the ability to use for…in, given just an iterator i: for x in IteratorSequence(i) { ... }

## Topics

### Initializers

- [init(_:)](swift/iteratorsequence/init(_:).md)

### Default Implementations

- [IteratorProtocol Implementations](swift/iteratorsequence/iteratorprotocol-implementations.md)
- [Sequence Implementations](swift/iteratorsequence/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)

## See Also

### Indices and Iterators

- [IndexingIterator](swift/indexingiterator.md)
- [EnumeratedIterator](swift/enumeratediterator.md)
- [SetIterator](swift/setiterator.md)
- [StrideThroughIterator](swift/stridethroughiterator.md)
- [StrideToIterator](swift/stridetoiterator.md)
