Hi,
I’m working on lambda expression
I wrote this code :
val calcul:(Int, Int)->Int={x: Int, y: Int -> val z = x+y
z}
exverything is OK
Now I try to use return as in the doc
val calcul:(Int, Int)->Int={x: Int, y: Int -> val z = x+y
return@calcul z}
I have got an error :
ERROR ‘return’ is not allowed here (Line_83.kts:2:1)
Why this error?