<@U3669PPNG> True. Class would be more useful only...
# announcements
s
@nkiesel True. Class would be more useful only if you had more logic to be done inside that function. Those could be defined as other private functions encapsulated inside that class.
n
s4nchez: not denying that there might be some use to extend lambdas, but your "function" could of course also be done due to "local functions":
Copy code
fun myLambda(name: String): () -> Unit = {
    fun p(n: String) {
        println("Hello, $n")
    }
    p(name)
}
👍 2