Skip to content

Instantly share code, notes, and snippets.

@steshaw
Created November 29, 2009 03:35
Show Gist options
  • Save steshaw/244778 to your computer and use it in GitHub Desktop.
Save steshaw/244778 to your computer and use it in GitHub Desktop.
sealed case class Person(name: String, age: Int)
val p = Person("Steven", 38)
println(p)
val p2 = p.copy(age = 39)
println(p2)
// This is enabled by 2.8's named and default arguments
// See http://www.scala-lang.org/node/2075
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment