Comment
Comment by almost
It's probably worth being up front about what your do syntax actually does. A generator is not as general as "do", Python doesn't have call/cc or anything like that. I checked and you (or Claude I guess) do it by rerunning the whole thing each time for things like the list monad which is not something I think anyone would want for anything more than a toy.