Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas

PatilShreyas/HOF1.kt Secret

Last active Jan 1, 2021
Embed
What would you like to do?
fun Button.onClick(action: () -> Unit) {
action()
}
fun initUI() {
button.onClick {
// Do something
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment