how do I declare return type inside a closure? (th...
# announcements
i
how do I declare return type inside a closure? (this doesn't compile)
s
???
What do you like to accomplish?
i
type inference was failing and I wanted a not-so verbose solution
but managed to write something acceptable with an extension function
s
try
Copy code
val closure: (Int)->Int = {a -> a*2 }