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
-~----------~----~----~----~------~----~------~--~---

Reply via email to