On Tue, 29 Mar 2011 23:11:53 -0400, Andrej Mitrovic <andrej.mitrov...@gmail.com> wrote:

I had a look at dcollections, it seems to have a few different
implementations of a set. And it has intersection (not sure about
difference or union). It's boost licensed, I wonder if Steve will make
a push of his library to Phobos when its done..

set1.difference(set2) => set1.remove(set2)
set1.union(set2) => set1.add(set2)

So they are there, but they just aren't called union and difference.

intersection isn't a very generic function, so it is called intersect. In fact, I had to add a special implementation function to both Hash and RBTree to get it to work correctly.

And yes, I will add intersection to std.container when the API for it becomes clear.

-Steve

Reply via email to