Now in Kotlin we can write: `fun log(str:String) =...
# language-proposals
u
Now in Kotlin we can write:
fun log(str:String) = println("$str in fun")
val log = { str: String -> println("$str in lambda") }
log("hello")
What will be output? And what is the difference if we omit parens:
log "hello"
? Logger functions is not very good example. Look at
await
,
yield
. Suspending call isn't ordinary and dropping parens so they would look like keywords (with IDE colored highlighting) would be a good idea
👎 7