How do I return from a function before reaching the last form in standard Racket? This can be useful to avoid a different level of indentation and nesting.
Common Lisp has return , a specialized form of return. Any equivalent in Racket, at least for refund?
Use let/ec to create a continuation of the continuation.
let/ec
Example:
(let/ec return (for ([x 10000]) (when (= x 100) (return x))))
Using let / ec is cheaper than using call / cc, which creates a full sequel.