Skip to content

Instantly share code, notes, and snippets.

@suhininalex
Created December 26, 2017 20:12
Show Gist options
  • Save suhininalex/43ed07786e0aad8d01c9e3f6ba26932a to your computer and use it in GitHub Desktop.
Save suhininalex/43ed07786e0aad8d01c9e3f6ba26932a to your computer and use it in GitHub Desktop.
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