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

add LinkedList#removeBy #72

Merged
merged 1 commit into from
Aug 12, 2015
Merged

add LinkedList#removeBy #72

merged 1 commit into from
Aug 12, 2015

Conversation

bantic
Copy link
Collaborator

@bantic bantic commented Aug 12, 2015

If iterating a list and removing items, the forEach will skip the
item after the current one.

See also #53 (comment)

cc @mixonic

@mixonic
Copy link
Contributor

mixonic commented Aug 12, 2015

We discussed writing a mutating removeBy as an alternative to this. I'm uncomfortable that the change to forEach would diverge it from the semantics on the corresponding array method.

@bantic bantic force-pushed the fix-linked-list branch 3 times, most recently from 1944e68 to 4425543 Compare August 12, 2015 21:05
@bantic bantic changed the title Do not skip items when removing and iterating a linked list add LinkedList#removeBy Aug 12, 2015
@mixonic
Copy link
Contributor

mixonic commented Aug 12, 2015

mixonic added a commit that referenced this pull request Aug 12, 2015
@mixonic mixonic merged commit 6d4983d into master Aug 12, 2015
@mixonic mixonic deleted the fix-linked-list branch August 12, 2015 21:47
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

Successfully merging this pull request may close these issues.

2 participants