Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fun main() {
myFunc(false) {
println("Hello, world!!!")
}
}
fun myFunc(someCondition: Boolean, funcRef: () -> Unit) {
if (someCondition) {
funcRef()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment