Currently isEmpty() will return false when an instance of Generator is passed, because it is an \Iterator, but doesn't implement the \Countable interface, so the predicate uses empty() on the variable which naturally returns false as the variable is not empty. However, the question arises if this is expected behavior when passing an instance of \Generator.
Currently
isEmpty()will returnfalsewhen an instance ofGeneratoris passed, because it is an\Iterator, but doesn't implement the\Countableinterface, so the predicate usesempty()on the variable which naturally returnsfalseas the variable is not empty. However, the question arises if this is expected behavior when passing an instance of\Generator.