This. And to clarify, in case it's unclear: every function in Clojure must return a value - there are no "void" functions as in Java. print and println, therefore, in addition to printing their data, must return something (they choose nil), and the REPL always prints out the return value of whatever you evaluate.
On Sep 8, 1:33 pm, David Nolen <dnolen.li...@gmail.com> wrote: > On Wed, Sep 8, 2010 at 2:26 PM, Sean <stanleyzhang2...@gmail.com> wrote: > > Hi, > > > I'm new to Clojure. This is also my first time posting here. > > When I use REPL and print something out, I always get a nil printed. > > For example, (print "Clojure"), I got: clojurenil. Where does the nil > > come from? > > > Thanks a lot! > > Try > > (println "Clojure") > > The nil is because the return value of print/println is nil. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en