Jun 2, 2022
Absolutely it does makes sense. Why should everyone pay the cost of keeping every token around forever? Why should every iterator that emits tokens be required to keep a history of their tokens?
An iterator wrapper that wraps an existing iterator so you can push back tokens or see previous tokens almost certainly already exists in your language, FFS, or if it doesn't, you could write one in literally an hour, and you can use it on any iterator.