For Gauche 0.9.5


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

4.2 Literals

Special Form: quote datum

[R7RS] 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: RnRS says it is an error to alter the value of a literal expression. Gauche doesn’t check constant-ness of pairs and vectors, and does not signal an error if you modify them using the destructive procedures such as set-car! and vector-set!. Doing so will cause unexpected results. Gauche does check constant-ness of strings, and signals an error if you try to alter a constant string.


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