Re: set vs hash-set

2014-02-06 Thread Gal Dolber
One takes a coll and the other a list of arguments user=> (set [1 1]) #{1} user=> (hash-set 1 1) #{1} On Thu, Feb 6, 2014 at 4:49 PM, Alan Thompson wrote: > OK, this one has me stumped. What is the difference between > clojure.core/set and clojure.core/hash-set ??? The source code is alm

set vs hash-set

2014-02-06 Thread Alan Thompson
OK, this one has me stumped. What is the difference between clojure.core/set and clojure.core/hash-set ??? The source code is almost identical. Is one to be preferred over the other depending on circumstances? Alan (defn set "Returns a set of the distinct elements of coll." {:added "1.0"