Skip to content

Instantly share code, notes, and snippets.

@ppurang
Created February 23, 2012 23:24
Show Gist options
  • Save ppurang/1895676 to your computer and use it in GitHub Desktop.
Save ppurang/1895676 to your computer and use it in GitHub Desktop.
extreme stratup
val add = """.*: what is (\d*) plus (\d*)""".r
q match {
case add(a, b) =>(a.toInt + b.toInt).toString
case bond() => // well we don't want to reveal too much
case banana() => //but bond and banana ought to get the attention.
case _ => ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment