umar
04/10/2017, 8:40 PMfun 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