[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Syntax of case expressions
From: |
Tobia Conforto |
Subject: |
Re: [Chicken-users] Syntax of case expressions |
Date: |
Mon, 3 Mar 2008 01:25:20 +0100 |
Apologies, I think I misread the thread.
Anyways:
Elf wrote:
how is it that ('a ...) isn't a syntax error? Is it because 'a
expands to (quote a), and is thus treated by case as a list of the
symbols quote and a? And if so, is that correct behavior? After all,
csi> (pair? 'a)
#f
(as I expected).
In (pair? 'a) the first argument to the *function* (not macro) pair?
is the symbol a, which is not a pair.
Here, on the other hand:
csi> (pair? ''a)
#t
the first argument to pair? is the list (quote a), which is a pair.
HTH
Tobia