|  | The solution is quite simple.  I can't believe PG didn't think of this, unless I've made a mistake and this doesn't work, but I've tested it on both mzscheme v372 and racket v5.0 and it seems to work fine.  (And it also runs faster; sorting a million-element list takes a bit more than half as long as it did before, running Arc in racket.) Solution: Find the definitions of x-set-car! and x-set-cdr! in ac.scm.  Replace them with the following definitions, and then move them so they come after the definitions of n-set-car! and n-set-cdr!.   (define x-set-car!
    (let ((fn (namespace-variable-value 'set-car! #t (lambda () #f))))
      (if (procedure? fn)
          fn
          n-set-car!)))
  (define x-set-cdr!
    (let ((fn (namespace-variable-value 'set-cdr! #t (lambda () #f))))
      (if (procedure? fn)
          fn
          n-set-cdr!)))
 |