[racket] irritating output format (shared ((-3- (list 3))) ...

From: Sancho (mkrobot77 at gmail.com)
Date: Wed Oct 19 16:31:28 EDT 2011

I try the following piece of code:

(define (insertions e list)
  (if (null? list)
      (cons (cons e list) list)
      (cons (cons e list)
            (map (lambda (tail) (cons (car list) tail))
                 (insertions e (cdr list))))))
 
(insertions 1 (list 2 3))


and the output I get is:

(shared ((-3- (list 3))) (list (cons 1 (cons 2 -3-)) (cons 2 (cons 1 -3-)) (list 
2 3 1)))


Is there a way to turn off this format? I prefer to get the output simply as:

(list (list 1 2 3) (list 2 1 3) (list 2 3 1))


So far I've been unable to find such an option in the Preferences or advice on 
the internet.




Posted on the users mailing list.