Skip to content

Instantly share code, notes, and snippets.

@7fe
Created May 19, 2017 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 7fe/c3bb55495b02ccacd14e0b72b3a25d77 to your computer and use it in GitHub Desktop.
Save 7fe/c3bb55495b02ccacd14e0b72b3a25d77 to your computer and use it in GitHub Desktop.
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