-
Notifications
You must be signed in to change notification settings - Fork 32
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
feature proposal: iterable interfaces #23
Comments
I'd be happy to submit a PR with this! |
Please do! Would that still be es5 compatible? |
Nope, But I think you can implement it in a backwards-compatible way: if (Symbol && Symbol.iterator) {
AVLTree.prototype[Symbol.iterator] = function (...) {...}
} |
That would be cool! |
What API do you prefer?
same for |
right? |
Okay, will implement this. A |
yes, let's do it like that. Maybe I will change the API later. I will also add your changes to the |
I have implemented this at
What do you prefer? |
Opted for 1. |
Using iterables to walk over a large amount of items/data has two advantages:
String
,Array
,Map
,Set
etc. are iterable.Examples of how iterables would be useful for this lib:
The text was updated successfully, but these errors were encountered: