diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
commit | 8466d8cfa486fb30d1755c4261b781135083787b (patch) | |
tree | c8c12c67246f543c3cc4f64d1c07e003cb1d45ae /pp.scm | |
parent | 87b82b5822ca54228cfa6df29be3ad9d4bc47d16 (diff) | |
download | slib-8466d8cfa486fb30d1755c4261b781135083787b.tar.gz slib-8466d8cfa486fb30d1755c4261b781135083787b.zip |
Import Upstream version 3a1upstream/3a1
Diffstat (limited to 'pp.scm')
-rw-r--r-- | pp.scm | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,15 +1,13 @@ ;"pp.scm" Pretty-Print (require 'generic-write) - -(define (pp:pretty-print obj . opt) +;@ +(define (pretty-print obj . opt) (let ((port (if (pair? opt) (car opt) (current-output-port)))) (generic-write obj #f (output-port-width port) (lambda (s) (display s port) #t)))) - +;@ (define (pretty-print->string obj . width) (define result '()) (generic-write obj #f (if (null? width) (output-port-width) (car width)) (lambda (str) (set! result (cons str result)) #t)) (reverse-string-append result)) - -(define pretty-print pp:pretty-print) |