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

# next()

Produces the next element in the map sequence.

## Declaration

```swift
mutating func next() async rethrows -> Transformed?
```

## Discussion

Discussion This iterator calls next() on its base iterator; if this call returns nil, next() returns nil. Otherwise, next() returns the result of calling the transforming closure on the received element.
