Skip to content

Instantly share code, notes, and snippets.

@Vistritium
Created September 14, 2017 22:37
Show Gist options
  • Save Vistritium/e5df70f220d2d706b5e3ef6af922a3b1 to your computer and use it in GitHub Desktop.
Save Vistritium/e5df70f220d2d706b5e3ef6af922a3b1 to your computer and use it in GitHub Desktop.
case class Foo(a: Int, b: String, c: Float)
object Main {
val foo = Foo(a = 1, c = 3, b = "lol")
val str = Foo.unapply(foo) match {
case Some((a, b, c)) => s"$a $b $c"
}
println(str)
def main(args: Array[String]): Unit = {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment