Background: Unlike the SICP style scheme, the Racket list immutable. To get the modified lists, in Racket you use mlist . What #lang planet/neil/SICP does (I look), (require mpair) and then rename mlist to list . Therefore, when you write list in this #lang , you are actually using mlist .
Anyway, mlist print differently, by default. But you can change two parameters.
(print-as-expression
Now it will print as
{1 2 3 4}
Curly brackets instead of parentheses indicate that this is a mutable list. To configure this, set another parameter:
(print-mpair-curly-braces
And now it should print as:
(1 2 3 4)
So that the regular Racket REPL always does this, I think you could put these two expressions in your Racket initialization file , for example. ~/.racketrc on OSX and Linux. Although I'm not sure if the REPL provided by Geiser reads the initialization file if you evaluate these expressions as soon as they should be saved for the Geiser REPL session, so you can put them in some .rkt file and visit it once.
source share