[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 05/12/11 15:32, Andy Wingo wrote:
> On Thu 12 May 2011 14:36, Jim Rees <jimreesma@x> writes:
>> On Thu, May 12, 2011 at 7:36 AM, Alaric Snell-Pym <alaric@x> wrote:
>>     But what happens if you try to REVERSE a syntax-object wrapping a list?
>>     You can't -
>> 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.

Yeah, I based my point on a statement by Eli that, IIRC, stated that
even the lists get magic wrapped cons cells some of the time.

> Andy


Alaric Snell-Pym

Scheme-reports mailing list