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 Gen.filterNot() method #367

Merged
merged 1 commit into from
Dec 4, 2017
Merged

Conversation

evis
Copy link
Contributor

@evis evis commented Oct 26, 2017

This method is helpful due to two reasons:

  1. Scala standard library monads have this method too. So, as library user, I expect Gen to have it.
  2. In some cases it's a bit easier to read filterNot() invocation compared with filter, for example:
object Cond { // means condition
  def apply(x: Int): Boolean = ???
}
Gen.choose(10, 25).filterNot(Cond) // compare with .filter(!Cond(_))

@rickynils rickynils merged commit 720b9b3 into typelevel:master Dec 4, 2017
@evis evis deleted the gen_filternot branch December 7, 2017 07:34
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