Playing with some problems of 4clojure, I wanted to make a map which, for 
each empty collection, returns a keyword. But it seems that it is 
impossible to have both an empty list and an empty vector in the same map.

user=> {() :list}
{() :list}
user=> {() :list [] :vector}
IllegalArgumentException Duplicate key: 
clojure.lang.PersistentList$EmptyList@1 
 clojure.lang.PersistentArrayMap.createWithCheck 
(PersistentArrayMap.java:70)
user=> {[] :vector}
{[] :vector}

I supposed that this is due to (= [] ()) but

user=> {'(1) :list [1] :vector}
{(1) :vector}
user=> (= [1]'(1))
true

What am I missing?

Juan Manuel

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

Reply via email to