Add ret macro
This commit is contained in:
parent
efb41ecc11
commit
c8af805cbe
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue