On Mon, Nov 29, 2010 at 8:07 PM, Sunil S Nandihalli <sunil.nandiha...@gmail.com> wrote: > Hello everybody, > I have a small doubt. Suppose > (def s #{1 2 3 4 5 6}) > (set s) > will calling set on an existing set shortcircuit the call and return the > same set or would it create a new one? I would like to extend the question > to hash-map and vec.. > thanks, > Sunil.
Why not just test it for yourself? user=> (def s #{1 2 3 4 5 6}) #'user/s user=> (= s (set s)) true user=> (identical? s (set s)) false Looks like it creates a new object, in the specific case of sets. -- 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