[racket] beginner's question on learning Scheme

From: Jim Wise (jwise at draga.com)
Date: Wed Aug 25 11:57:57 EDT 2010

Eli Barzilay <eli at barzilay.org> writes:

> On Aug 25, Jim Wise wrote:
>> Matthias Felleisen <matthias at ccs.neu.edu> writes:
>> 
>> > Open DrRacket, choose Language, click radio button "Use the language
>> > declared in the source", type
>> >
>> > #lang r6rs
>> 
>> Once you do this, IIRC, all of the examples in TSPL4 work in
>> DrRacket except for those that use set-car! and set-cdr!, since
>> Racket (by design) does not allow mutable pairs.
>
> In the r6rs language you get the mutable pairs by default:
>
>   #!r6rs
>   
>   (import (rnrs) (rnrs mutable-pairs))
>   
>   (write (let ([x (list 'a 'b 'c)])
>            (set-car! x 1)
>            x))

Oh, hmm -- I must have been doing something wrong, then.

-- 
				Jim Wise
				jwise at draga.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 184 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20100825/35bf29d6/attachment.sig>

Posted on the users mailing list.