[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: symbol-macrolet
- To: kanderso@WILMA.BBN.COM
- Subject: Re: symbol-macrolet
- From: Gregor.pa@Xerox.COM
- Date: Fri, 20 Nov 87 09:43 PST
- Cc: common-lisp-object-system@SAIL.STANFORD.EDU
- In-reply-to: The message of 20 Nov 87 03:37 PST from kanderso@WILMA.BBN.COM
- Line-fold: no
Date: Fri, 20 Nov 87 06:37:20 -0500
From: kanderso@WILMA.BBN.COM
I think there was an obvious bug in your example. How about:
(defmacro ^2 (form &optional environment)
(if (and (symbolp form)
(eq (macroexpand-1 form environment) form) ; <-
`(* ,form ,form)
`(expt ,form 2)))
Oops, you're right. I forgot NOT. Instead it should be:
(defmacro ^2 (form &optional environment)
(if (and (symbolp form)
(not (eq (macroexpand-1 form environment) form)))
`(* ,form ,form)
`(expt ,form 2)))
-------