Darryl Miles
fun myMethod(): java.util.function.Function<Int,String> { return { value: Int -> if(value == 42) "42" else "" } as Function<Int,String> // heh }
Ruckus
fun myMethod(): Function<Int, String> { return Function { value: Int -> if (value == 42) "42" else "" } }
fun myMethod(): Function<Int, String> = Function { if (it == 42) "42" else "" }
A modern programming language that makes developers happier.