Skip to content

Instantly share code, notes, and snippets.

@arifvn
Created November 15, 2020 12:07
Show Gist options
  • Save arifvn/f3a286a8c4d0f2da6c082599017714bd to your computer and use it in GitHub Desktop.
Save arifvn/f3a286a8c4d0f2da6c082599017714bd to your computer and use it in GitHub Desktop.
fun nonInline(callback: () -> Unit) {
println("before callback")
callback()
println("after callback")
}
// in java code
public void nonInline(Function callback) {
System.out.println("before callback");
callback.invoke();
System.out.println("after callback");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment