(defn
pprint
([object]
(let
[sb (StringBuffer.)]
(binding
[*out* (StringBufferWriter. sb)]
(pprint object *out*)
(string-print (str sb)))))
([object writer]
(with-pretty-writer
writer
(binding [*print-pretty* true] (write-out object))
(if (not (= 0 (get-column *out*))) (-write *out* \newline)))))