enleur
06/28/2017, 6:39 PMval isCool = fun(a: Int) = a > 0
val isCool = { a: Int -> a > 0 }
fun isCool(a: Int) = a > 0
are there any differences or pitfalls?dagguh
06/28/2017, 6:46 PMarocnies
06/28/2017, 6:47 PMilya.gorbunov
06/28/2017, 9:37 PMreturn
is allowed inside anonymous fun
but not inside lambda.
The third one declares a function isCool
, rather than a variable of functional type.enleur
06/28/2017, 10:10 PM