Created
December 26, 2017 20:12
-
-
Save suhininalex/43ed07786e0aad8d01c9e3f6ba26932a to your computer and use it in GitHub Desktop.
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
fun main(args: Array<String>) { | |
with(MyContext()){ | |
5.trueValue() | |
} | |
} | |
class MyContext { | |
val theTruth = 42 | |
fun Int.trueValue(){ | |
println(theTruth + this) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment