About function literals. Both lambdas and anonymous functions are function literals according to the documentation https://kotlinlang.org/docs/reference/lambdas.html#instantiating-a-function-type
I am wondering when anonymous functions should be used. I have seen plenty of uses of lambdas in code samples and tutorials but I still have to find some usage for an anonymous function. Where should I use one in place of a lambda, or simply, where should I just use one?
Thanks ❤️
h
hudsonb
12/01/2018, 6:45 PM
I think the only difference is in the
return
behavior
✔️ 1
k
karelpeeters
12/02/2018, 12:16 PM
I personally haven't found a use case for anonymous functions yet.