Skip to content

Instantly share code, notes, and snippets.

@jkinkead
Created November 1, 2017 20:39
Show Gist options
  • Save jkinkead/2df2a5b9bc5d111ec99065d5c6fe64df to your computer and use it in GitHub Desktop.
Save jkinkead/2df2a5b9bc5d111ec99065d5c6fe64df to your computer and use it in GitHub Desktop.
data class User(val name: String, val age: Int)
val myUser = User("Chip", 15)
// Destructuring myUser into two fields.
val (userName, userAge) = myUser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment