https://kotlinlang.org logo
#announcements
Title
# announcements
k

kirillrakhman

07/11/2017, 8:46 AM
huh, I just noticed that you can pass an empty lambda
{}
to a function expecting
() -> Any
because the lambda returns
Unit
which is a subtype of
Any
. That's ... interesting
k

karelpeeters

07/11/2017, 10:29 AM
That's also what allows methods that return the result of calling a lambda parameter in some context to return nothing.
6 Views