---
title: nextSpan()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/spaniterator/nextspan()
---

# nextSpan()

Returns a span over the next group of elements that are ready to by visited, up to the specifed maximum.

## Declaration

```swift
mutating func nextSpan() -> Span<Self.Element>
```
