For Gauche 0.9.15Search (procedure/syntax/module):

Next: , Previous: , Up: Core syntax   [Contents][Index]

4.2 Literals

Special Form: quote datum

[R7RS base] Evaluates to datum.

(quote x) ⇒ x
(quote (1 2 3)) ⇒ (1 2 3)
Reader Syntax: 'datum

[R7RS] Equivalent to (quote datum).

'x ⇒ x
'(1 2 3) ⇒ (1 2 3)

Note: Literals are immutable. You’ll get an error if you try to change, for example, a quoted pair with set-car! or a literal string with string-set!. Mutability may be managed differently for each type, so some object may not raise an error even if it appears in a part of literals (it is often the case with user-defined class with read-time constructor, see Read-time constructor. However, if you ever modify a literal data, it is not guaranteed that the program runs correctly.


Next: , Previous: , Up: Core syntax   [Contents][Index]


For Gauche 0.9.15Search (procedure/syntax/module):