Next: , Up: baselib expressions   [Index]


4.4.1 Quotation

Syntax: quote ?datum

?datum should be a syntactic datum. (quote ?datum) evaluates to the datum value represented by ?datum. This notation is used to include constants.

(quote a)               ⇒ a
(quote #(a b c))        ⇒ #(a b c)
(quote (+ 1 2))         ⇒ (+ 1 2)

(quote ?datum) may be abbreviated as '?datum:

'"abc"               ⇒ "abc"
'145932              ⇒ 145932
'a                   ⇒ a
'#(a b c)            ⇒ #(a b c)
'()                  ⇒ ()
'(+ 1 2)             ⇒ (+ 1 2)
'(quote a)           ⇒ (quote a)
''a                  ⇒ (quote a)

Constants are immutable.

NOTE Different constants that are the value of a quote expression may share the same locations.