Created
September 5, 2012 21:31
-
-
Save udalov/3645169 to your computer and use it in GitHub Desktop.
data class example
This file contains 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
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