I have some code that checks for a key as part of a cond statement. If I use a 
map everything works fine, but if I ever pass in a sorted-map things fail. I 
boiled down the issue to this:

user=> (contains? (sorted-map 1 2 3 4) :a)
ClassCastException java.lang.Long cannot be cast to clojure.lang.Keyword  
clojure.lang.Keyword.compareTo (Keyword.java:102)

Does anyone else think this is bad behavior, or should I ensure the map isn't 
sorted before asking it if it contains a key?

Cheers, Jay

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