slack1
2019-11-16 08:00:09
How does one do an “early return”? exit
?
notjack
2019-11-16 08:13:18
@slack1 More like raise
rokitna
2019-11-16 10:20:21
I think the let/ec
operation is particularly designed for early returns:
(let/ec my-return
(when (< x y)
; Return (+ x y) from the let/ec expression.
(my-return (+ x y)))
...)