Vlad
03/29/2019, 6:01 AMclass Dummy {
fun foo() = println("Hi")
}
fun Dummy.apply(f :Dummy.() -> Unit) = f()
Dummy().apply({ foo() })
How does Dummy.() -> Unit
know how it needs to dispatch the function call?edwardwongtl
03/29/2019, 10:04 AMf()
already means a function call?bdawg.io
04/15/2019, 5:54 PMf
variable has to be invoked to dispatch the function call.