I do like the idea of yielding, but I feel like this version is too complicated, and as someone mentioned above, exposes too many implimentation details to the caller.Yeild is similar to return, except instead of ending the execution of the function, it pauses it in place. Then the function resumes from where it was when it is called again. For example: I would like to be able to run through a list of items, and yeild to return the first item meeting some criteria. Then at some later point, I would like to resume running through that list (picking up where I left off). This would make building a packrat-style parser much easier.Perhaps a simpler way to approach this would be to have a rule that once it returns, it forever returns that same value when called (as opposed to having live and dead states). That way, if I want it to make it optional and have it return nil after it is dead, I can do that. Or I can throw an error if I prefer. Or I could just have it return an empty string if I want.The trickiest bit