Em 23/12/2009 19:17, Nicolas Cellier < nicolas.cellier.aka.n...@gmail.com > 
escreveu:

> 2009/12/23 Stéphane Ducasse :
> > Ideally what I would like is
> >
> > = isSameSequenceAs: + same receiver kind (may be overkill)
> >
> > isSameSequenceAs: otherCollection
> >        "Answer  whether  the  receiver's   size  is  the  same  as
> >         otherCollection's  size,   and  each  of   the  receiver's
> >         elements    equal    the    corresponding    element    of
> >         otherCollection."
> >
> > hasSameElements:
> >        "Answer  whether  the  receiver's   size  is  the  same  as
> >         otherCollection's  size,   and  each  of   the  receiver's
> >         elements is included in otherCollection and vice versa."
> > Stef
> >
>  like #(2 2 3) hasSameElements: #(2 3 3) -> true 

>  but #(2 2 3) asSet hasSameElements: #(2 3 3) -> false

Can someone illustrate this less enlightened coder what common programming 
pattern this wonderful method would of use for?

--
Cesar Rabak


_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to