Skip to content

Instantly share code, notes, and snippets.

@seanparsons
Created January 15, 2011 21:47
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 seanparsons/781293 to your computer and use it in GitHub Desktop.
Save seanparsons/781293 to your computer and use it in GitHub Desktop.
def intMatch(number: Int): String = {
return number match {
case 1 => "This is number 1."
case 2 => "This is number 2, it comes after 1."
case _ => "This number is neither 1 nor 2."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment