I'm working my way through SICP, using DrScheme. In Chapter 3 I started to have trouble with mutable pairs, but it wasn't such a hassle to rewrite everything with mcons etc. However in Chapter 4 it seems like it would be much easier to just run the code from:<br>
<br><a href="http://mitpress.mit.edu/sicp/code/index.html">http://mitpress.mit.edu/sicp/code/index.html</a><br><br>without having to modify it. I'm having trouble doing this! From suggestions around the web, it looks like running the Module language in DrScheme should be the way to go, but I can't make it work. If I try using #lang scheme, it gets stuck at the set-car!. If I use #lang r5rs, it doesn't know "error". And if I use #lang r6rs, I get the mysterious (to me) error:<br>
<br>Interactions disabled: r6rs does not support a REPL (no #%top-interaction)<br><br>Presumably there is a way to make this work; I've seen hints that it's possible to enable set-car! etc by loading particular libraries, but I haven't been able to find out which ones. If anyone can tell me how to get this code to work, or what the best alternative (in terms of minimal rewrites - I find it distracting to have to constantly be checking which things from the book need to be modified), I'd be very grateful.<br>