master
Avril 5 years ago
parent d8b6b620cb
commit 7282faabfa
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -48,7 +48,8 @@
(let ((errnm (gensym)))
`(let ((,errnm (handler-case (cons ,try nil)
(t (e)
(cons (progn ,@catch) e)))))
(let ((e e))
(cons (progn ,@catch) e))))))
(if (cdr ,errnm)
(values (car ,errnm) (cdr ,errnm))
(values (car ,errnm) nil)))))
@ -263,6 +264,13 @@
;; --- progressive evals
(defmacro progex (funcs expr)
"run funcs on expr, return specified"
(let ((name (gensym)))
`(let ((,name ,expr))
(mapcar #'(lambda (x) (funcall x ,name)) ,funcs)
,name)))
(defmacro progen (&rest things)
"mapn eval things"
`(mapn #'eval '(,@things)))

Loading…
Cancel
Save