cljs.pprint/print-length-loop
(print-length-loop bindings & body)
Source docstring:
A version of loop that iterates at most *print-length* times. This is designed
for use in pretty-printer dispatch functions.
(defmacro print-length-loop
[bindings & body]
(let [count-var (gensym "length-count")
mod-body (pll-mod-body &env count-var body)]
`(loop ~(apply vector count-var 0 bindings)
(if (or (not cljs.core/*print-length*) (< ~count-var cljs.core/*print-length*))
(do ~@mod-body)
(~'-write cljs.core/*out* "...")))))