Skip to content

Conversation

airspeedswift
Copy link
Member

Initial implementation for swiftlang/swift-evolution#675

@airspeedswift
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - f3e48e4e72b64b41a89b9029abbc279a20aa39af

@airspeedswift
Copy link
Member Author

@swift-ci please test linux platform

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This summary seems to be wrong..

Given that the names in the proposal have been changed, and the intent behind having an implementation is that people can get actual experience with the proposal, I think this PR should be updated before we run the review.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter doesn't seem to exist

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to make that fix separately from this PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name is predicate, not where, thank goodness!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy/paste error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

derp... thx

@airspeedswift airspeedswift changed the title Add removeAll(where:) to RangeReplaceableCollection Add remove(where:) to RangeReplaceableCollection Nov 16, 2017
@airspeedswift
Copy link
Member Author

@swift-ci please test

@martinr448
Copy link

I am not sure if it matters, but in remove(where:) the predicate is always evaluated twice for the first matching element, because the starting value for j is i, not its successor.

@airspeedswift
Copy link
Member Author

@martinr448 yeah, it also shouldn't use indices. I have been tinkering with this for a few different reasons including what the state should be if the predicate throws halfway, will push a new version soon.

@airspeedswift
Copy link
Member Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit 3430f38 into swiftlang:master Apr 7, 2018
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.

4 participants