I don't understand doto.
Suppose I try the following:
user=> (doto 1 println)
1
1
user=>
Now suppose I try the following:
user=> (doto 1 #(println (inc %)))
1
user=>
But if I make the following definition:
(defn some-function [x]
(println (inc x)))
user=> (doto 1 some-function)
2
1
user=>
Why did #(println (inc %)) not work and some-function work?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en