diff --git a/control-flow.lisp b/control-flow.lisp index 2e0f01646ae850066f8fd76d6d74eabe5c7725be..42a88f9d862cca31699a3d71b6d996f33603a733 100644 --- a/control-flow.lisp +++ b/control-flow.lisp @@ -94,3 +94,8 @@ NIL." ,(if (rest forms) `(nth-value-or ,nth-value ,@(rest forms)) nil)))))) + +(defmacro multiple-value-prog2 (first-form second-form &body body) + "Like CL:MULTIPLE-VALUE-PROG1, except it saves the values of the +second form." + `(progn ,first-form (multiple-value-prog1 ,second-form ,@body))) diff --git a/package.lisp b/package.lisp index 2677e4a71dc32d33cdefe4eb91383427a5dc0c86..899c3822a39ca13fd025db42d24ece66f31f179c 100644 --- a/package.lisp +++ b/package.lisp @@ -16,6 +16,7 @@ #:cswitch #:eswitch #:switch + #:multiple-value-prog2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; REVIEW PENDING ;;