I think I know what you mean by a "bag", but I'm not quite sure. How does a bag compare to a set, vector and/or list?
On Jun 9, 1:31 am, Richard Newman <holyg...@gmail.com> wrote: > The relational operations work on sets. That's often useful, but there > are situations in which preserving cardinality is more useful. One > such situation bit me today -- I did some relational operations on > some spreadsheet-esque data, much as I would in SQL or SPARQL, finally > projecting to the two columns I cared about before adding up some > numbers. > > The numbers didn't total correctly. A few minutes of reading my code > narrowed it down to the projection, which of course outputs a set, > discarding some of my inputs. > > Has there been any thinking about supporting a 'bag' sibling of 'set', > and allowing it to be passed correctly through the relational > operators? Right now I have a choice between rephrasing my code in non- > relational terms, or adding a unique value to each item to thwart the > distinctness semantics. I can't help but think that other people will > also encounter this. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---