That's why there are two separate functions do do what you suggest user=>(interleave [1 2 3 4] [1 2 3 4]) (1 1 2 2 3 3 4 4)
user=> (concat [1 2 3 4] [1 2 3 4]) (1 2 3 4 1 2 3 4) There's also the doall function to override lazyness. On Nov 19, 6:38 pm, nchubrich <nicholas.chubr...@gmail.com> wrote: > Yeah, remove will work for one kind of 'multiset' operator I am > thinking of. The others might as well preserve as much order as > possible. For instance, (add [1 2 3 4] [1 2 3 4]) could have two > interpretations; you just append, or you add like elements to > positions of like elements, so you get [1 1 2 2 3 3 4 4]. I guess you > could specify that with a flag :append vs. :match. > I'd also have a flag to choose eager evaluation vs. lazy (sometimes > it's nice to preserve the collection type, and you don't need lazy > evaluation for collections.). The "native" multiset type could be the > map type you suggested, and that would be used to determine equality. -- 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