[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Replace define-macro with syntax-rules

From: Taylan Ulrich B.
Subject: Re: [PATCH] Replace define-macro with syntax-rules
Date: Mon, 30 Sep 2013 21:24:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix)

Ian Price <address@hidden> writes:

> address@hidden (Taylan Ulrich B.) writes:
>> (define-syntax endianness
>>   (syntax-rules ()
>>     ((_ big) 'big)
>>     ((_ little) 'little)))
> Except now whenever you use it, you only ever get big endianness. You
> forgot to add big and little to the literals list.

Doh!  Can't believe I made such a mistake, must write more Scheme. :)

Well, actually, it will still coincidentally work because the `big' in
`'big' (`(quote big)') will refer to the pattern variable.  (Essentially
we made an alias to `quote'.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]