Re: (apply #'and '(t t nil)) not work
- From: Pascal Bourguignon <pjb@xxxxxxxxxxxxxxxxx>
- Date: Mon, 31 Mar 2008 21:39:31 +0200
fishmacs <wzhao1984@xxxxxxxxx> writes:
pjb@xxxxxxxxxxxxxxxxx (Pascal J. Bourguignon) writes:
Indeed, AND and OR are macros, not functions. This allows to shortcut:But SBCL said AND is a closure?
Of course, macros are functions! They're code making code.
But if you know how to ask, you'll see clearly AND is fbound to a
macro:
S/CL-USER[42]> (describe 'and)
AND is an external symbol in #<PACKAGE "COMMON-LISP">.
Macro-function: #<FUNCTION (MACRO-FUNCTION AND) {957F0C5}>Its associated name (as in FUNCTION-LAMBDA-EXPRESSION) is (MACRO-FUNCTION AND).
The macro's arguments are: (&REST FORMS)
On Sun, Mar 9, 2008 11:40:31 PM [-1] it was compiled from:
SYS:SRC;CODE;DEFBOOT.LISP Created: Saturday, March 3, 2007 11:49:26 AM [-1]
Documentation on the method-combination:NIL
S/CL-USER[43]> (symbol-function 'and)
#<CLOSURE (SB-C::&OPTIONAL-DISPATCH (LAMBDA (&REST SB-C::ARGS))) {99B040D}>
S/CL-USER[44]> (macro-function 'and)
#<FUNCTION (MACRO-FUNCTION AND) {957F0C5}>
S/CL-USER[45]>
--
__Pascal Bourguignon__ http://www.informatimago.com/
COMPONENT EQUIVALENCY NOTICE: The subatomic particles (electrons,
protons, etc.) comprising this product are exactly the same in every
measurable respect as those used in the products of other
manufacturers, and no claim to the contrary may legitimately be
expressed or implied.
.
- References:
- (apply #'and '(t t nil)) not work
- From: fishmacs
- Re: (apply #'and '(t t nil)) not work
- From: Pascal J. Bourguignon
- Re: (apply #'and '(t t nil)) not work
- From: fishmacs
- (apply #'and '(t t nil)) not work
- Prev by Date: Re: We don't want garbage, but...
- Next by Date: Re: indent for CL
- Previous by thread: Re: (apply #'and '(t t nil)) not work
- Next by thread: Re: (apply #'and '(t t nil)) not work
- Index(es):
Relevant Pages
|