Add ret macro

This commit is contained in:
Renaud Casenave-Péré 2015-12-27 16:56:03 +01:00
parent efb41ecc11
commit c8af805cbe

View file

@ -5,7 +5,7 @@
(uiop:define-package :stoe/core/utils
(:export #:safe-first #:safe-list
#:group
#:group #:ret
#:restartable
#:progress-step
#:loop-with-progress
@ -39,6 +39,11 @@
(nreverse (cons source acc))))))
(if source (rec source nil) nil)))
(defmacro ret (var val &body body)
`(let ((,var ,val))
,@body
,var))
(defmacro restartable (&body body)
"Provide a Continue restart."
`(restart-case