Is there a simple way of testing if the generator has no items, like peek, hasNext, isEmpty, something along those lines?
bool(generator) will return the correct result
How do I know if a generator is empty from the start?