chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Implementing a macroexpand-all


From: Patrick Li
Subject: Re: [Chicken-users] Implementing a macroexpand-all
Date: Sat, 12 Feb 2011 12:18:30 -0500

Ah I'm using Chicken 4.4.0. 
I'm a beginner to Chicken and just typed "port install chicken" into my MacOSX terminal.
I'll figure out how to upgrade Chicken. 
  -Patrick

On Sat, Feb 12, 2011 at 12:04 PM, Peter Bex <address@hidden> wrote:
On Sat, Feb 12, 2011 at 11:52:40AM -0500, Patrick Li wrote:
> I didn't understand what you mean by this part. How do I perform a "full
> expansion"?
> eg.
> (define-syntax mymacro (syntax-rules () ((mymacro) (lambda () 3))))
>
> (expand '(mymacro))
> => (lambda1020 () 3)

What version of Chicken are you using?
I see the following with 4.6.0 and 4.6.5:

#;1> (define-syntax mymacro (syntax-rules () ((mymacro) (lambda () 3))))
#;2> (expand '(mymacro))
(##core#lambda () 3)

Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                       -- Donald Knuth


reply via email to

[Prev in Thread] Current Thread [Next in Thread]