<div dir="ltr"><div>Hello,</div><div><br></div><div>My understanding is that Racket intentionally does not provide set-car! and set-cdr! and that this is one of the ways in which Racket is not fully compatible with Scheme.</div>
<div><br></div><div>Am I right to think that it is trivially easy to add these features to Racket? Specifically, I'm thinking of:</div><div><br></div><div><br></div><div>(define-syntax set-car!</div><div>  (syntax-rules ()</div>
<div>    ((_ l new_car) (set! l (cons new_car (cdr l))))))</div><div><br></div><div>(define-syntax set-cdr!</div><div>  (syntax-rules ()</div><div>    ((_ l new_cdr) (set! l (cons (car l) new_cdr)))))</div><div><br></div>
<div><br></div><div>Or did I miss something?</div><div><br></div><div>Cheers,</div><div>Daniel.</div>-- <br>When an engineer says that something can't be done, it's a code phrase that means it's not fun to do.<br>

</div>