that's also my question. when you call a function ...
# announcements
l
that's also my question. when you call a function without defining a return type, it 'returns'
Unit
. So basically the only way that I can see it being callable, would be an extension to `Unit`:
Copy code
fun foo(){}
fun Unit.bar(){}
and calling it
Copy code
foo().bar()
I'm more interested in the reason... what exactly are you trying to accomplish? 😂 ---- Nevermind, I just realized you can call
fun ((String)->Unit).bar(){}
like so:
Copy code
val foo: ((String)->Unit) = {}
foo.bar()