sets

Full Join/Intersection in couchdb

Hi, I have some documents which have 2 sets of attributes: tag and lieu. Here is an example of what they look like: { title: "doc1", tag: ["mountain", "sunny", "forest"], lieu: ["france", "luxembourg"] }, { title: "doc2", tag: ["sunny", "lake"], lieu: ["france", "germany"] }, { title: "doc3", tag: ["sunny"], lieu: ["b...

Intensional and extensional definition of sets

Hi, I am searching for a extensional definition for the following set: E := { m | m subset {a,b,c,d} and |m| = 2} My idea is E := {{a,b}, {a,c}, {a,d}, {b,c}, {b,d}, {c,d}, {a,a}, {b,b}, {c,c}, {d,d}} any ideas? ...

.NET check if two IEnumerable<T> have the same elements

Possible Duplicate: Comparing two collections for equality I need to verify if two IEnumerable<T> lists have the same elements, not necessarily in the same order. I'm targetting .NET 3.5. Here are the tests. The question is, how should HasSameElements() be implemented? var l1 = new[]{1,2,3}; var l2 = new[]{3,1,2}; bool rez...