This extension seems to work fine in Swift 5, but gives `Mutation of captured var 'total' in concurrently-executing code` in Swift 6. I believe this is because`AsyncSequence.map` defines its closure as async, even though I don’t need to it to be. Anybody know of a way around this? Seems like a typical thing to want to do.

```
extension AsyncSequence<String, Never> {
var concatenated: some AsyncSequence<String, Never> {
var total = ""
return map {
total += $0
return total
}
}
}
```

#Swift #Swift6 #SwiftConcurrency #AsyncSequence

#Swift #CoreData #Combine #Concurrency #AsyncSequence #NotificationCenter

Can anyone more familiar with above topics help me understand what’s going on here?

I thought that NotificationCenter Combine-based and AsyncSequence-based API-s behave exactly the same. Now I hit a case where they don’t. Their behavior differs based on whether I give it the sending object or not.

Why?

 Unconventional Shapes #1 - Actors with AsyncSequences

#SwiftUI apps use threads for UI, model and network. This can glitch and crash. Should you cross your fingers, or add complex locks?

#Swift #Concurrency can help! Actors are a new way to code the data model in your swift App. Actor methods give safe async access to one value from the model's data.

What if you need more than one result, like streamed posts from the network?

Use #AsyncSequence! Here's today's Unconventional Shape: