Skip to content

Instantly share code, notes, and snippets.

@suhininalex
Created December 26, 2017 20:13
Show Gist options
  • Save suhininalex/84252309e3935a3d1dc9a93c63a725b8 to your computer and use it in GitHub Desktop.
Save suhininalex/84252309e3935a3d1dc9a93c63a725b8 to your computer and use it in GitHub Desktop.
fun main(args: Array<String>) {
with(Context()){
println(5.trueValue())
}
}
class Context {
val theTruth = 42
fun Int.trueValue() = theTruth + this
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment