[plt-scheme] Re: Problem of type
You might not like the way that expr->string handles strings and
quotes. Format provides three choices (one is like expr->string.)
Below is a comparison between the REPL, expr->string, and 3 uses of
format:
(require (lib "string.ss"))
(define list-of-expr '((define a "string") (define b 'symbol) ...))
(define (display-expr expr) (format "~a" expr))
(define (write-expr expr) (format "~s" expr))
(define (print-expr expr) (format "~v" expr))
list-of-expr
(newline)
(map expr->string list-of-expr)
(newline)
(map display-expr list-of-expr)
(newline)
(map write-expr list-of-expr)
(newline)
(map print-expr list-of-expr)
rac
On Nov 25, 2007, at 10:22 AM, Laurent wrote:
> Oh yes, thanks ;)
>
> It's perfect.
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme