[plt-scheme] Issue in ver-4.0 with mutable pairs
Vinay Sachdev skrev:
> Hi,
> I am reading SICP and i am at the start of chap-3.
> I am using PLT-Scheme ver-4.0 .I ran into problem with
> mutable pairs. it was giving error. So instead of using
> set-car! i used set-mcar!, but then even to create list
> i have to create mutable list.
> I have an older version also(ver-3.71). Is it a bad idea to
> install older version or is there any other way out?
In the module language, try this:
#lang r5rs
(let ((p (cons 1 2)))
(set-car! p 4)
(display p))
It prints (4 . 2).
> My main purpose is to do read SICP and do its exercise.
> One more question, is there any other issues with
> PLT-Scheme in later chapters of SICP?
When you come to the picture language, use this
PLaneT package:
http://planet.plt-scheme.org/package-source/soegaard/sicp.plt/2/1/planet-docs/sicp-manual/index.html
/Jens Axel