Brian D. Carlstrom | 18 Jun 2004 19:39
Favicon

scheme 48 0.57 set-cdr! bug

John Jaeger writes:
 > the following script runs in both mzscheme and guile
 > without problems, but in scheme48 (0.57), it throws an
 > exception.

I don't believe this a bug. I believe r5rs says that implementations can
make quoted and quasiquoted constants immutable so they can share
storage. mzscheme and guile apparently don't have this option, but I've
run into it with quasiquote before I think. This works:

(define d (list 'a 'b 'c))
(define p (cdr d))
(set-cdr! p (cadr p))
(display p) (newline)

-bri


Gmane