John Harrop wrote: > This is just (sort (concat [1 2 3 4 5 6 7] [3 2 7])) though. > > > I think he also wants the original order of the first input coll to be > preserved, though. Sort wouldn't do that.
Hmmm.. that's a pretty weird set of requirements. Usually a multiset/bag is unordered. What happens if same elements aren't grouped together in the first input coll it, it just arbitrarily picks one of their positions and moves them all together there? :-) If you're going to go to the trouble of making special multiset functions you may as well create a new multiset collection type that does the "right thing" when you conj to it and such. It is also means you can store things in a way that allows efficient implementation of the operations, instead of just hoping the library user passes data in the right order or using slow but safe n^2 or n log n algorithms everywhere. -- 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