---
title: next()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/joinedsequence/iterator/next()
---

# next()

Advances to the next element and returns it, or nil if no next element exists.

## Declaration

```swift
mutating func next() -> JoinedSequence<Base>.Iterator.Element?
```

## Discussion

Discussion Once nil has been returned, all subsequent calls return nil.
