`difference` is actually `relativeComplement`
Closed this issue · 2 comments
robrix commented
The symmetric difference of sets a
and b
is (a + b) - (a & b)
(the union minus the intersection). difference()
is actually doing the equivalent of a - b
which is the relative complement of b
in a
.
We should rename difference
to complement
or relativeComplement
and implement a real symmetric difference method.
cf #4.
sharplet commented
Voting for complement
, as opposed to relativeComplement
, which I think implies it's the relative kind due to the types involved. We don't have a useful idea of a "universe" to absolutely complement with respect to.
robrix commented
That’s my thinking as well 👍