Login  Register

Re: OrderedSet?

Posted by hernanmd on Dec 06, 2015; 4:53pm
URL: https://forum.world.st/OrderedSet-tp4865554p4865613.html

Have a look at:

http://www.mail-archive.com/help-smalltalk@.../msg01225.html
http://www.squeaksource.com/PharoTaskForces.html
http://www.smalltalkhub.com/#!/~Moose/CollectionExtensions

Hernán


2015-12-05 23:21 GMT-03:00 Peter Uhnak <[hidden email]>:
Hi,

what would be the equivalent of an OrderedSet?

1. all elements are unique

2. they are ordered

3. adding an existing element moves it
so
myOrderedSet addLast: x. "<- x is added as last"
myOrderedSet addFirst: x. "<- x is moved from last to first"

Thanks,

--
Peter