Support of algebraic operations on sets

sig siguctua at gmail.com
Sat Jun 16 14:13:34 UTC 2007


On 16/06/07, Ron Teitelbaum <Ron at usmedrec.com> wrote:
> Sig,
>
> I'm still trying to follow this conversation, is your argument simply that
> #= should be implemented in dictionary only comparing keys and not values,
> so that
>
> (Dictionary at: #a put: 1) = (Dictionary at: #a put: 2)
>
> Which means that
>
>  | dict1 dict2 result1 result2 |
>  dict1 := Dictionary new.
>  dict2 := Dictionary new.
>  dict1 at: 1 put: 5.
>  dict2 at: 1 put: 6.
>
>  result1 := dict1 union: dict2.
>  result2 := dict2 union: dict1.
>
> result1 = #(1->6) = result2 = #(1->5)
>
> and
>
>  result1 includes: #(1->5) = true
>
I think you meant:
 #( a->b ) to be just (a->b) everywhere, because #(1->5) is the array
with 3 elements in my squeak.. not association.


>  because
>         #(1->6) = #(1->5)?
>

And then yes. As you can see, then everything is at right places.


> Ron Teitelbaum
>
> > sig wrote:
> > To what i propose is to be the following:
> >
> > SigAssociation methodsFor: 'comparision'
> > = argv
> >      ^ key = argv key
> >
> >
>



More information about the Squeak-dev mailing list