#!r6rs
and #!racket
(short for #lang racket
) are different languages. Racket allows you to blend them but pairs in R6RS is base on mutable pairs while #!racket uses immutable pairs. In #!racket the default output syntax for mcons
(which all pairs in procedures from a R6RS library will be) are constructor
so that you can clearly see difference between them and #!racket lists.
I advice you to not blend languages but if that is exactly what you want you can change the behaviour of how the interaction window displays results in the language options (In the bottom left select box, choose "Choose language", then click Show details. Under "Output syntax" you can choose everything to be shown as constructor, quasiquote, write (what you expected) or print (the default printing according to the selected language).
So if choose not to blend languages you can just remove (require rnrs/base-6)
since rnrs base library pretty much has the same stuff as #!racket/base
and your program has the larger #!racket
defined as language. Howver, if you need mutation of pairs it's pretty awful to do it in #!racket so then you could change to R6RS by changing #!r6rs and
(import (rnrs))mcons
will display in #!r6rs as
cons` do in #!racket.