-
Notifications
You must be signed in to change notification settings - Fork 127
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
Implement Iterator.prototype.drop #673
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% done yet, but reviewable!
Edit: ready for review now.
@bnoordhuis PTAL, Tests pass locally, this should be good for review! Once this one lands I expect the rest to be simple to add, I scratched my head a few times while working on this, but I feel like I got a much better understanding as to how iterators work internally! |
Green! |
abort(); | ||
} | ||
|
||
done: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should free the wrapped iterator after we are done with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At terminal state, when the helper won't touch the wrapped iterator anymore? I would assume so.
Probably doesn't matter from a correctness perspective (not observable), only for efficiency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I'll leave this for the end because I suspect some simplification will happen once all remaining methods are in.
abort(); | ||
} | ||
|
||
done: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At terminal state, when the helper won't touch the wrapped iterator anymore? I would assume so.
Probably doesn't matter from a correctness perspective (not observable), only for efficiency.
Includes the scaffold for other iterator helper methods that require an Iterator Helper object.
6fdc48a
to
92cd712
Compare
Includes the scaffold for other iterator helper methods that require an Iterator Helper object.