Created
April 19, 2019 15:22
-
-
Save StylingAndroid/922cc3c0b21c56aca4195ba9c777cb0d to your computer and use it in GitHub Desktop.
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() { | |
myFunc(true, ::doSomething) | |
} | |
fun doSomething() { | |
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