On Jun 25, 2009, at 11:43 AM, CuppoJava wrote:

Is there a "print" command that doesn't separate it's arguments using
spaces? I wrote my own function to work-around this but hopefully it's
already been done for me.

(defn write [& strings]
 (print (apply str strings)))

Hi Patrick,

Clojure also has a printf wrapper for Java's printf (and format if you want the result as a string rather than as a side effect):

  user=> (printf "Tightly%sPacked%dStrings%.4fCan%sBe%sFun\n"
                 "one" 2 3.0 'four :five)
  TightlyonePacked2Strings3.0000CanfourBe:fiveFun
  nil
  user=>

clojure.contrib.pprint provides cl-format (which can do either):

  user=> (cl-format true "There~ayou go!~&" :angels)
  There:angelsyou go!
  nil
  user=>

--Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to