On 14/06/12 15:10, Tassilo Horn wrote:
The docs clearly state that.

Where? I don't see any warnings...It does say "... calls all of the methods and functions with the value of x supplied at the front of the given arguments" but it wasn't obvious to me at first!

user=> (doc dotimes)
-------------------------
clojure.core/dotimes
([bindings & body])
Macro
  bindings => name n

  Repeatedly executes body (presumably for side-effects) with name
  bound to integers from 0 through n-1.
nil
user=> (doc doto)
-------------------------
clojure.core/doto
([x & forms])
Macro
  Evaluates x then calls all of the methods and functions with the
  value of x supplied at the front of the given arguments.  The forms
  are evaluated in order.  Returns x.

  (doto (new java.util.HashMap) (.put "a" 1) (.put "b" 2))
nil
user=>


Then, you need (.bar foo x), (.baz foo y), and (.zap foo g), too.


yes of course - that goes without saying... :-)

Jim



--
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

Reply via email to