[racket] Running Racket in the R6RS mode
Here is the entire contents of a file named tryme.rkt:
;;-----------------------------
#!r6rs
(import (rnrs base)
(rnrs sorting (6)))
;;-----------------------------
I start up racket from the command-line (non-gui) and type:
(enter! "tryme.rkt")
(list-sort < '(4 2 7 1)) ; note: list-sort is from R6RS's sorting library
This produces:
(mcons 1 (mcons 2 (mcons 4 (mcons 7 '()))))
Is there a way to get a plain (1 2 4 7) representation?
Aside: My objective here is to limit Racket to R6RS in the
hope that my code will be portable to other platforms that
implement R6RS. If this is not the right way of going
about it, please let me know
--
Rouben Rostamian