I may arrive at the party a little late but just to mention I got bitten by this too (while working on clojure-py, so I actually want to know about the weird edge cases...)
user=> #{(rand-int 100) (rand-int 100)} IllegalArgumentException Duplicate key: (rand-int 100) clojure.lang.PersistentHashSet.createWithCheck (PersistentHashSet.java:68) Of course you can even replace rand-int by a function which is actually guaranteed to return different values on consecutive calls, e.g. a closure over an atom. -- 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