[plt-scheme] How to get pretty-print pretty ?

From: Robert Bruce Findler (robby at cs.uchicago.edu)
Date: Sat Aug 3 13:13:26 EDT 2002

Pretty-print doesn't break lines unless it has to -- since your sexp
fits on one line it doesn't do anything. One thing you can do is tell
pretty print to use fewer columns and then it will break the lines. See
pretty-print-columns in Help Desk.

Robby

At Fri, 02 Aug 2002 22:19:08 -0500, Blake McBride wrote:
>   For list-related administrative tasks:
>     http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> 
> Greetings,
> 
> If I do the following (in 200):
> 
> (define lst '(define fun
>                 (lambda (a b)
>                   (let ((c a)
>                         (d b))
>                     (+ c d)))))
> (print lst)
> (newline)
> (pretty-print lst)
> 
> I get:
> 
> (define fun (lambda (a b) (let ((c a) (d b)) (+ c d))))
> (define fun (lambda (a b) (let ((c a) (d b)) (+ c d))))
> 
> Is there a way to get pretty-print to really be pretty?  I know it splits
> lines but how do I get it to print in a (readable) style similar to
> my (define lst ...  above?
> 
> Thanks.
> 
> Blake McBride
> 




Posted on the users mailing list.