[plt-scheme] How to load a file.
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?