define-with-return   macro


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/init.xtm

Implementation

;;;; Handy for imperative programs
;;;; Used as: (define-with-return (foo x y) .... (return z) ...)
(macro (define-with-return form)
       `(define ,(cadr form)
          (call/cc (lambda (return) ,@(cddr form)))))


Back to Index