Clojure constantly and map function

Viewed 275

Why does this bit of Clojure code:

user=> (map (constantly (println "Loop it.")) (range 0 3))

Yield this output:

Loop it.
(nil nil nil)

I'd expect it to print "Loop it" three times as a side effect of evaluating the function three times.

3 Answers
Related