Hmm, that's an interesting question. It looks to me like into could be implemented exactly like clojure.set/union, e.g., (reduce conj to from), so I'm not sure why it's written the way it is ... I must be missing something.
Anyway, I think clojure.set/union is just a special case of into, at least as far as what the interfaces promise. My guess would be that it currently exists just for parity with intersection and difference. In the version I propose [1], however, there would be two advantages to using clojure.set/union: - Can be faster, when the first argument is smaller than the other (s). - Works on any number of arguments (including 0/1). -Jason [1] http://groups.google.com/group/clojure/browse_thread/thread/b35ca9035762e1a4?hl=en# On Jan 31, 5:56 pm, Mark Volkmann <r.mark.volkm...@gmail.com> wrote: > What's the difference between into and clojure.set/union? While their > source code is quite different, they seem to do the same thing to me. > > -- > R. Mark Volkmann > Object Computing, Inc. --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---