catch   macro


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

Implementation

(macro (catch form)
       (let ((label (gensym)))
         `(call/cc (lambda (exit)
                     (push-handler (lambda () (exit ,(cadr form))))
                     (let ((,label (begin ,@(cddr form))))
                       (pop-handler)
                       ,label)))))


Back to Index