Skip to content

Instantly share code, notes, and snippets.

@udalov
Created September 5, 2012 21:31
Show Gist options
  • Save udalov/3645169 to your computer and use it in GitHub Desktop.
Save udalov/3645169 to your computer and use it in GitHub Desktop.
data class example
data class Result(val x: Int, val y: String)
fun computeSomething(): Result {
return Result(42, "")
}
fun main() {
val (x, y) = computeSomething()
println(x)
println(y)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment