Support of algebraic operations on sets

Gary Chambers gazzaguru2 at btinternet.com
Fri Jun 15 12:45:16 UTC 2007


Indeed. Whay not have a method that does that in Collection then?
Write once, use many times!

-----Original Message-----
From: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] On Behalf Of sig
Sent: 15 June 2007 1:40 pm
To: The general-purpose Squeak developers list
Subject: Re: Support of algebraic operations on sets


On 15/06/07, Gary Chambers <gazzaguru2 at btinternet.com> wrote:
> Note that #difference: is the relative complement of the two sets, 
> rather than the symmetric difference. Perhaps we could have a method 
> for that too!
>

no, its perfectly fits with algebraic form.
a symmetric difference can be implemented easily:

(a diff: b) union: (b diff:a)
or:
(a union: b) diff: ( a intersection: b )




More information about the Squeak-dev mailing list