*print-length*

dynamic varsince v0.0-2060 clojure.core/*print-length*Edit

Limits the number of items in each collection to print. Defaults to nil indicating no limit. A ... is printed for items not shown.


Examples:

range is an infinite sequence, but can be safely printed using *print-length*:

(binding [*print-length* 5]
  (println (range)))
;; Prints:
;; (0 1 2 3 4 ...)
;;
;;=> nil

All printed collections are abridged:

(binding [*print-length* 5]
  (println {:a (range) :b (range)}))
;; Prints:
;; {:a (0 1 2 3 4 ...) :b (0 1 2 3 4 ...)}
;;
;;=> nil

Source docstring:
*print-length* controls how many items of each collection the
printer will print. If it is bound to logical false, there is no
limit. Otherwise, it must be bound to an integer indicating the maximum
number of items of each collection to print. If a collection contains
more items, the printer will print items up to the limit followed by
'...' to represent the remaining items. The root binding is nil
indicating no limit.
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(def
  ^{:dynamic true
    :jsdoc ["@type {null|number}"]}
  *print-length* nil)