Using Xcode 14, in the second Typewriter example, for this line:
defer { index = phrase.index(after: index) }
you now get the following error:
Main actor-isolated var 'index' can not be mutated from a non-isolated context
To fix the error, I changed the line to:
await MainActor.run { index = phrase.index(after: index) }
And everything works again as expected.