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 `evalFilterNot` and `evalFilterNotAsync` #1635

Merged

Conversation

@CremboC
Copy link
Contributor

commented Sep 24, 2019

A recent PR #1619 added evalFilter and evalFilterAsync, here I'm added their cousins evalFilterNot and evalFilterNotAsync.

This is an optimisations instead of doing something like

_.evalFilter(foo.map(!_))

we simply do the more obvious

_.evalFilterNot(foo)

Only issue I see is the name of evalFilterNotAsync being bad. But it's follows the same pattern so not sure what else to call it...

P.S. I am expecting the tests to fail on this first commit. Specifically hoping only one of them fails and I'll fix it once it does.

@mpilquist

This comment has been minimized.

Copy link
Member

commented Oct 4, 2019

I recently noticed we don't have filterNot on Stream -- want to add that too?

@mpilquist mpilquist merged commit fad332e into functional-streams-for-scala:master Oct 4, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@SystemFw

This comment has been minimized.

Copy link
Member

commented Oct 4, 2019

I'm going to say it: I think both evalFilterNotAsync and evalFilterAsync are overly specific :)

@CremboC

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2019

@SystemFw I don't need the Async myself, but since it's there, I added the Not version for symmetry 🤷‍♂

@SystemFw

This comment has been minimized.

Copy link
Member

commented Oct 5, 2019

Yeah I would remove both honestly :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.