(defmacro neg (n) `(and (numberp ,n) (< ,n 0))) (setf x (if (neg x) x (- x))) (setf y (sqrt (neg (- 3)))) |
(i) Provide the code produced by the expansion of the macro prior to compilation.
(ii) Briefly explain, in your own words, what that particular macro achieves and why it is or is not an appropriate use of macros.