@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.
Thread in Slack Conversation
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":
kotlin
fun myLambda(name: String): () -> Unit = {
fun p(n: String) {
println("Hello, $n")
}
p(name)
}