Generic-Write
-------------
`(require 'generic-write)'
`generic-write' is a procedure that transforms a Scheme data value
(or Scheme program expression) into its textual representation and
prints it. The interface to the procedure is sufficiently general to
easily implement other useful formatting procedures such as pretty
printing, output to a string and truncated output.
- Procedure: generic-write obj display? width output
OBJ
Scheme data value to transform.
DISPLAY?
Boolean, controls whether characters and strings are quoted.
WIDTH
Extended boolean, selects format:
#f
single line format
integer > 0
pretty-print (value = max nb of chars per line)
OUTPUT
Procedure of 1 argument of string type, called repeatedly with
successive substrings of the textual representation. This
procedure can return `#f' to stop the transformation.
The value returned by `generic-write' is undefined.
Examples:
(write obj) == (generic-write obj #f #f DISPLAY-STRING)
(display obj) == (generic-write obj #t #f DISPLAY-STRING)
where
DISPLAY-STRING ==
(lambda (s) (for-each write-char (string->list s)) #t)