Skip to content

Instantly share code, notes, and snippets.

@dwins
Created September 18, 2015 14:12
Show Gist options
  • Save dwins/465afdfd16e886bdcff3 to your computer and use it in GitHub Desktop.
Save dwins/465afdfd16e886bdcff3 to your computer and use it in GitHub Desktop.
scala> case class Tx[T](tag: T, value: Int)
defined class Tx
scala> Tx(1, 1)
res0: Tx[Int] = Tx(1,1)
scala> res0.copy(tag = "one")
res1: Tx[String] = Tx(one,1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment