Skip to content

Instantly share code, notes, and snippets.

@phatnhse
Created July 29, 2023 00:14
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 phatnhse/6761c2d3fac3202e61623ee5af495522 to your computer and use it in GitHub Desktop.
Save phatnhse/6761c2d3fac3202e61623ee5af495522 to your computer and use it in GitHub Desktop.
inline-with-lambda
fun main() {
print("foo ")
bar {
print("bar");
}
// prints: foo bar
}
inline fun bar(invoke: () -> Unit) {
invoke()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment