From 8ffbc2df0fde83082610149d24e594c1cd879f4a Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:25 -0800 Subject: Import Upstream version 2a6 --- pp.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pp.scm (limited to 'pp.scm') diff --git a/pp.scm b/pp.scm new file mode 100644 index 0000000..1dbada0 --- /dev/null +++ b/pp.scm @@ -0,0 +1,12 @@ +;"pp.scm" Pretty-print + +(require 'generic-write) + +; (pretty-print obj port) pretty prints 'obj' on 'port'. The current +; output port is used if 'port' is not specified. + +(define (pp:pretty-print obj . opt) + (let ((port (if (pair? opt) (car opt) (current-output-port)))) + (generic-write obj #f 79 (lambda (s) (display s port) #t)))) + +(define pretty-print pp:pretty-print) -- cgit v1.2.3