On Wed, Sep 12, 2012 at 10:38 AM, jarppe <jar...@gmail.com> wrote:
> user=> {(generate-id) "foo" (generate-id) "bar"}
> IllegalArgumentException Duplicate key: (generate-id)
> clojure.lang.PersistentArrayMap.createWithCheck (PersistentArrayMap.java:70)

This is treated as a literal so the reader sees (generate-id) in both
key positions and considers it an error. Essentially, the reader
attempts to construct the map with two entries first and after that
the expressions are evaluated. As Jim suggests, use hash-map instead
and you'll be fine.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

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