[plt-scheme] Borrowing #' aka quote-syntax

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sat Dec 9 12:03:24 EST 2006

Sam Tobin-Hochstadt skrev:
> On Sat, 2006-12-09 at 00:03 +0100, Jens Axel Søgaard wrote:
> 
>> Today I wanted to borror #' for my own purpose, so I tried
>> the same trick:
>>
>>  > (let-syntax ([quote-syntax
>>                  (lambda (stx)
>>                    (display "foo\n")
>>                    (syntax-case stx ()
>>                      [(_ datum) #'42]))])
>>      (list #'abc #'(1 2 3)))
>> (.#<syntax:22:12> .#<syntax:22:18>)
>>
>> The first syntax-object contains abc and the other (1 2 3).
> 
> #' is an abbreviation for syntax, not quote-syntax.

Doh!

Thanks,
Jens Axel Søgaard



Posted on the users mailing list.