Re: Behaviour of clojure.set functions with non-sets.

2010-10-19 Thread Rob Lachlan
It's not free. (defn set Returns a set of the distinct elements of coll. {:added 1.0} [coll] (clojure.lang.PersistentHashSet/create ^clojure.lang.ISeq (seq coll))) It seems to go element by element, irrespective of whether it was given a hashset. Rob On Oct 18, 9:43 pm, Phil Hagelberg

Behaviour of clojure.set functions with non-sets.

2010-10-18 Thread Phil Hagelberg
It looks like the behaviour of some clojure.set functions is either undefined or possibly erroneous when called with non-set arguments: user (clojure.set/union #{:a :b} [:b :c]) #{:a :c :b} user (clojure.set/union #{:a} [:b :c]) [:b :c :a] Seems likely that the behaviour in such cases is just