In Kotlin, it is possible to give lambda arguments names in their definition.
fun example(lambda: (a: Int, b: Int) -> Int)
As you can see, a
and b
are named in the lambda. I thought this might be really useful information for an IDE, to generate lambdas with the parameter names filled-in.. but at least with IntelliJ the functionality either doesn't exist or works in a way I'm unaware.
So, what are the uses of named lambda arguments? Do they change the compile output in some way? And are there any tricks you can use them for?