Skip to content

Instantly share code, notes, and snippets.

@jaredwy
Created July 12, 2011 07:24
Show Gist options
  • Save jaredwy/1077548 to your computer and use it in GitHub Desktop.
Save jaredwy/1077548 to your computer and use it in GitHub Desktop.
match the 1
case class X(x: Int, y :Int)
//this is what drives the mower
private def doSomething(delta): X = x match {
case X(x,1) => update(x,1 + delta)
case _ => X(1,2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment