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

# next(isolation:)

Produces the next element in the map sequence.

## Declaration

```swift
mutating func next(isolation actor: isolated (any Actor)?) async throws(AsyncMapSequence<Base, Transformed>.Failure) -> Transformed?
```

## Discussion

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