Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isEmpty() and Generator #11

Open
mikey179 opened this issue Mar 2, 2020 · 0 comments
Open

isEmpty() and Generator #11

mikey179 opened this issue Mar 2, 2020 · 0 comments

Comments

@mikey179
Copy link
Member

mikey179 commented Mar 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant