(guile.info.gz) Pretty Printing
Info Catalog
(guile.info.gz) Value History
(guile.info.gz) Top
(guile.info.gz) Formatted Output
42 Pretty Printing
******************
The module `(ice-9 pretty-print)' provides the procedure
`pretty-print', which provides nicely formatted output of Scheme
objects. This is especially useful for deeply nested or complex data
structures, such as lists and vectors.
The module is loaded by simply saying.
(use-modules (ice-9 pretty-print))
This makes the procedure `pretty-print' available. As an example
how `pretty-print' will format the output, see the following:
(pretty-print '(define (foo) (lambda (x)
(cond ((zero? x) #t) ((negative? x) -x) (else (if (= x 1) 2 (* x x x)))))))
-|
(define (foo)
(lambda (x)
(cond ((zero? x) #t)
((negative? x) -x)
(else (if (= x 1) 2 (* x x x))))))
-- Scheme Procedure: pretty-print obj [port]
Print the textual representation of the Scheme object OBJ to PORT.
PORT defaults to the current output port, if not given.
Info Catalog
(guile.info.gz) Value History
(guile.info.gz) Top
(guile.info.gz) Formatted Output
automatically generated byinfo2html