Created
July 29, 2023 00:14
-
-
Save phatnhse/6761c2d3fac3202e61623ee5af495522 to your computer and use it in GitHub Desktop.
inline-with-lambda
This file contains 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() { | |
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