You're viewing version 1.2.0 of fresh-line. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

fresh-line

clojure.pprint

  • (fresh-line)
Make a newline if *out* is not already at the beginning of the line. If *out* is
not a pretty writer (which keeps track of columns), this function always outputs a newline.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/pprint/cl_format.clj:1187 top

(defn fresh-line
  "Make a newline if *out* is not already at the beginning of the line. If *out* is
not a pretty writer (which keeps track of columns), this function always outputs a newline."
  {:added "1.2"}
  []
  (if (instance? clojure.lang.IDeref *out*)
    (if (not (= 0 (get-column (:base @@*out*))))
      (prn))
    (prn)))
Vars in clojure.pprint/fresh-line: *out* = defn fresh-line instance? not prn deref
Used in 0 other vars

Comments top

No comments for fresh-line. Log in to add a comment.