[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Syntax of case expressions
From: |
Ivan Raikov |
Subject: |
Re: [Chicken-users] Syntax of case expressions |
Date: |
Thu, 28 Feb 2008 12:01:47 +0900 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Yes. My apologies for screwing up something so simple to correct a
simple mistake :-)
Here is the relevant part of R5RS:
Literal expressions
-------------------
- syntax: quote <datum>
- syntax: ' <datum>
- syntax: <constant>
`(quote <datum>)' evaluates to <datum>. <Datum> may be any
external representation of a Scheme object. This notation is
used to include literal constants in Scheme code.
(quote a) ==> a
(quote #(a b c)) ==> #(a b c)
(quote (+ 1 2)) ==> (+ 1 2)
`(quote <datum>)' may be abbreviated as '<datum>. The two
notations are equivalent in all respects.
'a ==> a
'#(a b c) ==> #(a b c)
'() ==> ()
'(+ 1 2) ==> (+ 1 2)
'(quote a) ==> (quote a)
''a ==> (quote a)
Numerical constants, string constants, character constants, and
boolean constants evaluate "to themselves"; they need not be
quoted.
'"abc" ==> "abc"
"abc" ==> "abc"
'145932 ==> 145932
145932 ==> 145932
'#t ==> #t
#t ==> #t
Matt Gushee <address@hidden> writes:
> Ivan Raikov wrote:
>> Oops, I meant that (define foo 'a) -> (define foo (quote a)).
>
> No wonder I was confused.