For Programmers: Free Programming Magazines  


Home > Archive > Scheme > February 2005 > Possible errata in R5RS?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Possible errata in R5RS?
ckimyt@gmail.com

2005-02-12, 3:57 am

I couldn't find a reference to this particular example as an error, so
either no one noticed it, no one cares, or I'm wrong.

=)

If the latter, could someone please tell me why?

Section 4.2.6 on quasiquotation states (page 13 of the PDF, bottom of
the left column):

"Quasiquote forms may be nested. Substitutions are made
only for unquoted components appearing at the same nesting
level as the outermost backquote. The nesting level increases
by one inside each successive quasiquotation, and
decreases by one inside each unquotation."

Then the example is given (top right column of page 13):

`(a `(b ,(+ 1 2) ,(foo ,(+ 1 3) d) e) f)
=> (a `(b ,(+ 1 2) ,(foo 4 d) e) f)

I think this is wrong. Why is ,(+ 1 3) evaluated? It's clearly at the
`(b ...) level of quasiquotation. I think the example should read:

`(a `(b ,(+ 1 2) ,(foo ,(+ 1 3) d) e) f)
=> (a `(b ,(+ 1 2) ,(foo ,(+ 1 3) d) e) f)

because there are no (unquote ...) or (unquote-splicing ...) constructs
at the `(a ...) level of quasiquotation.

Anyone?

Thanks...

Mike

2005-02-12, 3:57 am

Yeah, OK, I re-read it again and thought about it and I was wrong.

Sorry to waste bandwidth.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com