You're viewing version 1.2.0 of pr. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16
  • (pr)
  • (pr x)
  • (pr x & more)
Prints the object(s) to the output stream that is the current value
of *out*. Prints the object(s), separated by spaces if there is
more than one. By default, pr and prn print in a way that objects
can be read by the reader

2 Examples top

  • user=> (pr "foo")
    "foo"nil
  • user=> (pr {:foo "hello" :bar 34.5})
    {:foo "hello", :bar 34.5}nil
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:2815 top

(defn pr
  "Prints the object(s) to the output stream that is the current value
  of *out*.  Prints the object(s), separated by spaces if there is
  more than one.  By default, pr and prn print in a way that objects
  can be read by the reader"
  {:dynamic true
   :added "1.0"}
  ([] nil)
  ([x]
     (pr-on x *out*))
  ([x & more]
   (pr x)
   (. *out* (append \space))
   (if-let [nmore (next more)]
     (recur (first more) nmore)
     (apply pr more))))
Vars in clojure.core/pr: *out* apply defn first if-let

Comments top

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