On Sat, Nov 14, 2009 at 2:51 PM, Kevin Q <kevin.jing....@gmail.com> wrote:

> Hi,
> Thanks for the hint. I tried (map deref agents) and it did work. I
> don't know if this is a bug?


Nah, it's just being really sneaky.


> > (fn* [p1__6536] ((clojure.core/deref p1__6536)))
>

Even I didn't notice it before. There's an extra pair of parens, so it's
double-dereferencing. The problem is that #() brings in one pair, and @ in
expanding to (deref the-argument) brings in a second.

Just use (map deref agents).

General advice: Avoid directly using another reader macro inside #(); the
first thing should always be a symbol or a call that evaluates to a
function, e.g. #((function-returning-function arg) other-arg).

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