Skip to content

Instantly share code, notes, and snippets.

@alz-ahm
Last active March 20, 2019 12:06
Show Gist options
  • Save alz-ahm/453e3ea982add2468ad777d7e363e8cb to your computer and use it in GitHub Desktop.
Save alz-ahm/453e3ea982add2468ad777d7e363e8cb to your computer and use it in GitHub Desktop.
class MyClass(val doThis: () -> Unit, val doThat: (number: Int) -> Unit = {}) {
fun someFunction(){
doThis()
doThat(12)
}
}
class UserClass {
val myClass = MyClass(::doThis, ::doThat)
private fun doThis() {
}
private fun doThat(number: Int) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment