Skip to content

Instantly share code, notes, and snippets.

@jacobappleton
Created August 17, 2015 04:17
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 jacobappleton/20ffbd0fd12e069b1be8 to your computer and use it in GitHub Desktop.
Save jacobappleton/20ffbd0fd12e069b1be8 to your computer and use it in GitHub Desktop.
Pattern matching example
def matchTest(x: Int): String = x match {
case 1 => "one"
case 2 => "two"
case _ => "many"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment