[plt-scheme] How to load a file.

From: Noel Welsh (noelwelsh at gmail.com)
Date: Tue Mar 10 08:37:39 EDT 2009

If you're reasonably comfortable with Scheme, you might try using the
scheme/mpair library, which gives you mutable pairs (and from that,
mutable lists):

-> (require scheme/mpair)
-> (define m1 (list->mlist '(a b c d)))
-> m1
{a b c d}
-> (set-mcar! m1 'z)
-> m1
{z b c d}

Etc.

You would have to translate the code from SICP to use mutable lists,
which basically involved prefixing m to every list function (so mcar,
mcons etc.) and using list->mlist as I've done above to convert
literal (immutable) lists to mutable lists.

N.

On Tue, Mar 10, 2009 at 12:28 PM, Vinay Sachdev <vinay.sachdev at gmail.com> wrote:
> Dear Sir,
>  I am using r5rs as module language. The reason I am using r5rs as
>  module language because I am reading SICP and code from Chap-3
>  is not working in newer version(Mutable list to be precise).
>  So somebody from thid community suggested me to use r5rs as module
>  language.
>  Is there any better way to do it?


Posted on the users mailing list.