Skip to content

Instantly share code, notes, and snippets.

@missingfaktor
Created October 24, 2011 18:54
Show Gist options
  • Select an option

  • Save missingfaktor/1309813 to your computer and use it in GitHub Desktop.

Select an option

Save missingfaktor/1309813 to your computer and use it in GitHub Desktop.
scala> def not: Boolean => Boolean = ! _
not: Boolean => Boolean
scala> def odd: Int => Boolean = _ % 2 != 0
odd: Int => Boolean
scala> List(3, 11, 4).filter(not compose odd)
res93: List[Int] = List(4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment