Skip to content

Instantly share code, notes, and snippets.

@ruurtjan
Last active May 22, 2020 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruurtjan/6979f5ebb827c7c5c57e74ce97066e96 to your computer and use it in GitHub Desktop.
Save ruurtjan/6979f5ebb827c7c5c57e74ce97066e96 to your computer and use it in GitHub Desktop.
functional-dsl-blog-1.scala
val filter = EmailFilter.senderIsNot(Address("me@gmail.com")) &&
EmailFilter.bodyContains("Unsubscribe")
val newsletters = emails.filter(filter.run)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment