Last active
February 27, 2020 07:48
-
-
Save Audhil/c2b1c5cc936e84a63fee41afe5408e7b to your computer and use it in GitHub Desktop.
kotlin scope functions
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
fun main() { | |
val val1 = run { | |
"function" | |
// true | |
} | |
val val2 = run { | |
// "function" | |
true | |
} | |
println(val1) // function | |
println(val2) // true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment