Paul Tarvydas paultarvydas@gmail.com writes:
What is the best way to write a macro that returns more than one form to the top level? E.g.
(in-package :xxx) (defun ...)
I've been wrapping a progn around the result, but LW doesn't like it very much, and SBCL seems to hate it.
(defmacro this-works-but-it-s-bad-form-to-mix-in-package-with-other-things () (let ((package :xxx)) `(progn (in-package ,package) (defun ,(intern "FNAME" package) (x) (if (< x 1) 1 (* x (,(intern "FNAME" package) (1- x))))))))