This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: possibly bug with ,@


Martin Grabmueller <mgrabmue@cs.tu-berlin.de> writes:

> Hello folks,
> 
> I found the book ``The Scheme Programming Language (2nd Edition)'' on the
> web and tried out some examples.  In the book, the expression
> 
> (let ((a 1) (b 2))
>   `(,a ,@b))
> 
> evaluates to
> 
>   (1 . 2)

The book is wrong.  The code probably works as a Chez Scheme extension,
but it is not standard Scheme.

> R5RS did not help me about this.  Can you tell me who is right?

R5RS is quite clear:

    If a comma appears followed immediately by an at-sign (@), then
    the following expression must evaluate to a list; ...

Now, whether this is a useful enough extension to be more
widely supported is a different matter.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]