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

From: Ryan Culpepper (ryan at cs.utah.edu)
Date: Sun Oct 23 01:19:31 EDT 2011

On 10/19/2011 01:31 PM, Sancho wrote:
> 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.

I assume you're using the Advanced Student language in DrRacket? If so, 
go to the "Languages menu", then select "Choose Language ...". At the 
bottom of the dialog, click "Show Details", and at the bottom of the 
"Output Syntax" group on the right, uncheck the box labeled "Show 
sharing in values".

Ryan


Posted on the users mailing list.