|
From: | Neil Jerram |
Subject: | Re: case syntax and symbols |
Date: | Tue, 22 Mar 2005 07:21:58 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 |
Marius Vollmer wrote:
It is a bit tricky. The syntax 'x is short for (quote x). This expansion is done by the reader without looking at the context. So, what the evaluator really sees is (case 'x ((quote x) #t) (else #f)) This is indeed in the form required by R5RS, although probably only by accident. As expected, the following also evaluates to true: (case 'quote ('x #t) (else #f)) => #t Also (and don't try this at home kids): (define 'x (* x x)) '2 => 4
And presumably (or in my view) this is all fine, except for the last example, where Guile should signal an error or at least give a warning. Right?
Neil
[Prev in Thread] | Current Thread | [Next in Thread] |