Yeah, I thought I was being smart, by reusing the same code, as in I thought the logic was the same:
This is missing in typewriter2 !!!
Yes, but even with it in, it is still not changing anything.
In general it’s better to write a more abstract version of the function and use it for both cases. Eg you could pass the String and what’s the next state as a parameter
Could I ask you to elaborate on this, as I’m not sure what you mean, in particular ‘pass the String and what’s the next state as a parameter’
Thanks