Re: Defmacro Signature
- From: "Alex Mizrahi" <udodenko@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 23:34:48 +0200
(message (Hello 'Michael)
(you :wrote :on '(Wed, 31 Jan 2007 22:13:55 +0100))
(
MB> I found this macro-lambda-list in a lisp source file written by Edi
MB> Weitz.
MB> (defmacro insert-char-class-tester ((char-class chr-expr) &body body)
MB> ^^^^^^^^^^^^^^^^^^^^^
MB> I can't see how this definition conforms to the hyperspec:
MB> http://www.lispworks.com/documentation/HyperSpec/Body/03_dd.htm
MB> reqvars::= var*
and why do you think var is an atom here? read more careful!
Destructuring allows a macro lambda list to express the structure of a macro
call syntax.
http://www.lispworks.com/documentation/HyperSpec/Body/03_dda.htm
3.4.4.1 Destructuring by Lambda Lists
Anywhere in a macro lambda list where a parameter name can appear, and where
ordinary lambda list syntax (as described in Section 3.4.1 (Ordinary Lambda
Lists)) does not otherwise allow a list, a destructuring lambda list can
appear in place of the parameter name. When this is done, then the argument
that would match the parameter is treated as a (possibly dotted) list, to be
used as an argument list for satisfying the parameters in the embedded
lambda list. This is known as destructuring.
MB> Is this form often used in macro-definitions??
yes
)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"People who lust for the Feel of keys on their fingertips (c) Inity")
.
- References:
- Defmacro Signature
- From: Michael Bohn
- Defmacro Signature
- Prev by Date: Re: Defmacro Signature
- Next by Date: Re: Defmacro Signature
- Previous by thread: Re: Defmacro Signature
- Next by thread: Re: Defmacro Signature
- Index(es):
Relevant Pages
|