Skip to content

Instantly share code, notes, and snippets.

@mkmik
Created December 13, 2010 23:21
Show Gist options
  • Save mkmik/739785 to your computer and use it in GitHub Desktop.
Save mkmik/739785 to your computer and use it in GitHub Desktop.
case class matchHello(a: String) extends Matcher[String]() {
def apply(number: => Int) = {
val b = number
(b % 2 == 0, b + " is even", b + " is odd")
}
}
val beEven = new Matcher[Int] {
def apply(number: => Int) = {
val b = number
(b % 2 == 0, b + " is even", b + " is odd")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment