Hi,

On Feb 8, 12:14 pm, Michael Wood <esiot...@gmail.com> wrote:

> user=> (doto (java.util.ArrayList.)
> (.add "1")
> (.add "2"))
> #<ArrayList [1, 2]>

Oops. Yes. You need doto instead of ->. Sorry, my mistake.

> > Is it possible to create the macro without the (gensym) call? I wasn't
> > able to use something like lname#.
>
> Sorry, I'm not sure why that doesn't work.

It doesn't work because the scope of lname# is limited to the `().
However lname is used in a ~@() which leaves the `() and enters the
enclosing environment (in this case the macros). There the lname# is
not valid.

Sincerely
Meikel

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