<Return in lambda expression> Hi, I’m working on l...
# forum
r
Return in lambda expression 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.kts21) Why this error? 1 post - 1...