The procedures provided by the (rnrs mutable-pairs (6))library allow new values to be assigned to the car and cdr fields of previously allocated pairs.
Stores obj in the car field of pair. The set-car! procedure returns unspecified values.
(define (f) (list ’not-a-constant-list))
If an immutable pair is passed to set-car!, an exception with condition type &assertion should be raised.
Stores obj in the cdr field of pair. The set-cdr! procedure returns unspecified values.
If an immutable pair is passed to set-cdr!, an exception with condition type &assertion should be raised.
(let ((x (list ’a ’b ’c ’a))