cdrick a écrit :

or again
removeAll: aCollection
        aCollection == self
                ifTrue: [self removeAll: aCollection copy]
                ifFalse: [aCollection do: [:each | self remove: each]].

Or maybe, if aCollection == self, a warning could be raised ?

What do you think ?

Cédrick


aCollection == self is not the only case that can fail.
Imagine i pass a wrapper collection on self, like a MappedCollection.

When i will change self with remove:, i will also change the argument which is just a wrapper on self.

Hope my explanations are not too much confusing...

Nicolas

_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to