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
Shouldn't .take()
return IterableIterator
instead of Iterator
#285
Comments
An |
What is |
Then TypeScript kinda sucks here, right? (at least right now) |
That's right—which is what the issue discusses. The only non-breaking fix will be to separate |
The
README.md
mentions that abstractnaturals().take()
returnsIterator
I'm curious why an iterator that already knows the number of iterations still returns
Iterator
and notIterableIterator
, as inSet.keys()
. Additionally, I believe it would be more obvious to castreduce
onIterableIterator
instead ofIterator
.Although using array methods such as
reduce
onIterableIterator
would mean implementingreduce
(and probably others) there instead, I still think it's a better solution than recreating the same features for each new proposal.What are your thoughts?
The text was updated successfully, but these errors were encountered: