Search found 1 match

by claytontstanley
Sat Dec 31, 2011 10:20 pm
Forum: Common Lisp
Topic: Alternative (MACROEXPAND ...)
Replies: 4
Views: 7865

Re: Alternative (MACROEXPAND ...)

Here's a simpler implementation of macroexpand-n. This one doesn't require the let binding:

Code: Select all

(defun macroexpand-n (n body)
  "Return body macroexpanded n times"
  (if (= 0 n)
    body
    (macroexpand-n (1- n) (macroexpand-1 body))))