[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] [wg2] in support of single-arity procedural syntax transformers
On Thu, 12 May 2011 10:32:05 -0400, Andy Wingo <wingo@x> wrote:
>> Overall your essay is illuminating, but reversing a syntax-object
>> representing a list is easy in an R6RS-conforming implementation.
>> (define (reverse-wrapped-list obj)
>> (syntax-case obj ()
>> ((e ...) (reverse #'(e ...)))))
> This works on psyntax systems, where lists are never wrapped, but AFAIK
> it does not work on Racket, where lists are wrapped.
In R6RS, this is required to work. I believe Racket in R6RS mode complies
with this requirement, though I could be wrong. Where Racket differs is in
(list? #'(a b c))
Here, there are no pattern expansions, and thus, it could be treated as a
single, completely wrapped object, or it could be a list with each of the
Aaron W. Hsu
Programming is just another word for the lost art of thinking.
Scheme-reports mailing list