Last active
May 10, 2017 09:45
-
-
Save darionyaphet/1b9aebb6bf3fe3c067e04e34e7f4e792 to your computer and use it in GitHub Desktop.
Case Class --> Tuple
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class People(name: String, age: Int) | |
val me = People("darion.yaphet", 26) | |
val (name, age) = People.unapply(me).get | |
************************************************************ | |
val (name_, age_) = me match { | |
case People(name, age) => (name, age) | |
} | |
************************************************************ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment