cljs.pprint/formatter
(formatter format-in)
Source docstring:
Makes a function which can directly run format-in. The function is
fn [stream & args] ... and returns nil unless the stream is nil (meaning
output to a string) in which case it returns the resulting string.
format-in can be either a control string or a previously compiled format.
(defmacro formatter
[format-in]
`(let [format-in# ~format-in
my-c-c# cljs.pprint/cached-compile
my-e-f# cljs.pprint/execute-format
my-i-n# cljs.pprint/init-navigator
cf# (if (string? format-in#) (my-c-c# format-in#) format-in#)]
(fn [stream# & args#]
(let [navigator# (my-i-n# args#)]
(my-e-f# stream# cf# navigator#)))))