Kotlin code:
``
fun hello(who: String, message: String) {
println(who + ", " + message)
}
fun test(func: (String, String) -> Unit) {
func(“Kotlin”, “hello”)
}
fun main() {
test({(a, b) -> hello(a, b) })
}
You can see the last line is pretty complex. Is there any way to write it simpler?
e.g. in scala, we can write:
test(hello _)