Previous: , Up: srfi list spec   [Index]


2.2.5.12 Primitive side–effects

These two procedures are the primitive, R5RS side–effect operations on pairs.

Function: set-car! pair object
Function: set-cdr! pair object

R5RS These procedures store object in the car and cdr field of pair, respectively. The returned value is unspecified.

(define (f) (list 'not-a-constant-list))
(define (g) '(constant-list))
(set-car! (f) 3) =>  *unspecified*
(set-car! (g) 3) =>  *error*