My 'requirements' were not so much for any particular need, but to try to think up a logical and complete API for dealing with multisets. I agree that there should be an actual collection type for multisets (implemented as an underlying map of values to frequencies I presume); but you might as well also be allowed to pass any kind of collections and have it do something order-preserving with them. It makes a good gathering point for sequence functionalities as \well as handling multisets.
Alex is right that the keep-likes-with-likes option is a little weird. I'm not sure whether to just conj them next to the first instance, or try to equally distribute them as much as possible throughout the instances, leaving any remainders on the initial ones. Probably the latter. Of course when you have this kind of questioning, maybe it is not a good fundamental functionality to add. (My original spur for this was in merging argument lists in a permissive argument list macro I'm working on; the idea was you would get 'rest' type parameters anywhere in the list there is a repetition of variables under a keyword. Obviously you wouldn't want to have disparate instances of the same thing here. (My initial thoughts on this macro are at the bottom of the most recent discussion of keyword arguments. (How, by the way, do you do "show quoted text"?)) There is a sort of hierarchy of sequences for being sensible for multiset operations. First we have multisets themselves. Then we have sequences that are ordered but have no dislocated repetition of elements. Then we have arbitrary sequences. I'm inclined to want an API that handles all three. Maybe someone who does a lot of statistical work would have a better idea of how this API should work. Sean, regarding doall, the reason I wanted to have an internal override is to be able to preserve the collection type of the arguments. Sometimes it gets a little annoying to cast these back every time; and when you're dealing with small sequences, laziness is not really necessary. If you wanted to be \really evil about it, you could have a bind-able variable *lazy* that sets it one way or the other. -- 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