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
merged 1 commit into from
Oct 4, 2019

Conversation

CremboC
Copy link
Contributor

@CremboC CremboC 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
Copy link
Member

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

@mpilquist mpilquist merged commit fad332e into typelevel:master Oct 4, 2019
@SystemFw
Copy link
Collaborator

SystemFw commented Oct 4, 2019

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

@CremboC
Copy link
Contributor Author

CremboC 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
Copy link
Collaborator

SystemFw 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants