[plt-scheme] Re: Problem of type

From: Richard Cleis (rcleis at mac.com)
Date: Sun Nov 25 16:28:44 EST 2007

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  

(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))

(map expr->string list-of-expr)
(map display-expr list-of-expr)
(map write-expr list-of-expr)
(map print-expr list-of-expr)


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

Posted on the users mailing list.