1.3.0 permalink Arrow_down_16x16
  • (pp)
A convenience macro that pretty prints the last thing output. This is
exactly equivalent to (pprint *1).

1 Example top

  • user=> (zipmap 
            [:a :b :c :d :e] 
            (repeat 
              (zipmap 
                [:a :b :c :d :e] 
                (take 5 (range)))))
    {:e {:e 4, :d 3, :c 2, :b 1, :a 0}, :d {:e 4, :d 3, :c 2, :b 1, :a 0}, :c {:e 4, :d 3, :c 2, :b 1, :a 0}, :b {:e 4, :d 3, :c 2, :b 1, :a 0}, :a {:e 4, :d 3, :c 2, :b 1, :a 0}}
    
    user=> (clojure.pprint/pp)
    {:e {:e 4, :d 3, :c 2, :b 1, :a 0},
     :d {:e 4, :d 3, :c 2, :b 1, :a 0},
     :c {:e 4, :d 3, :c 2, :b 1, :a 0},
     :b {:e 4, :d 3, :c 2, :b 1, :a 0},
     :a {:e 4, :d 3, :c 2, :b 1, :a 0}}
    nil
    
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/pprint/pprint_base.clj:254 top

(defmacro pp 
  "A convenience macro that pretty prints the last thing output. This is
exactly equivalent to (pprint *1)."
  {:added "1.2"}
  [] `(pprint *1))
Vars in clojure.pprint/pp:
Used in 0 other vars

Comments top

No comments for pp. Log in to add a comment.