Created
May 19, 2017 16:52
-
-
Save 7fe/c3bb55495b02ccacd14e0b72b3a25d77 to your computer and use it in GitHub Desktop.
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(args: Array<String>) { | |
var i = 1; | |
print("print",{ | |
i = 2; | |
printUpperCase("uppercase",{ | |
i =3; | |
println(i); | |
}) | |
}) | |
} | |
fun print(a:String ,fn: () -> Unit){ | |
println(a); | |
fn(); | |
} | |
fun printUpperCase(a:String,fn: () -> Unit){ | |
println(a.toUpperCase()); | |
fn() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment