From: Marty Hall
Subject: Re: COND as macro? (was Re: Q: where to find code for COND, LET, DO, etc.)
Date: 
Message-ID: <DCE0yL.Io9@aplcenmp.apl.jhu.edu>
In article <··········@rheged.dircon.co.uk> ·····@rheged.dircon.co.uk (Simon Brooke) writes:
>In article <·················@netcom.com>,
>William Paul Vrotney <·······@netcom.com> wrote:
>>
>>In Common Lisp to see the implementation of a macro just use MACROEXPAND
>>on the expression you are interested in. For example a COND expression
>>
>>        (macroexpand '(cond (a b) (c d)))
>>
>>would return something like
>>
>>        (IF A (PROGN B) (COND (C D)))
>
>I am interested and surprised. I always think of IF as a macro which
>expands to COND -- COND being after all one of the dozen or so most
>fundamental bits of LisP. It would be mildly interesting to know which
>implementations of CL treat COND as primitive, and which IF.

On Suns, all three of Franz Allegro CL, Harlequin LispWorks, and Lucid
CL expand (cond (a b) (c d)) into some sort of IF.

Franz:     (IF A (PROGN B) (COND (C D)))
Harlequin: (IF A (PROGN B) (IF C (PROGN D) NIL))
Lucid:     (IF A B (IF C D NIL))
							- Marty
(proclaim '(inline skates))