A case for valueless AA's?
Steven Schveighoffer
schveiguy at yahoo.com
Wed Mar 30 05:59:29 PDT 2011
On Tue, 29 Mar 2011 23:11:53 -0400, Andrej Mitrovic
<andrej.mitrovich at 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
More information about the Digitalmars-d
mailing list