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
Have a look at: http://www.mail-archive.com/help-smalltalk@gnu.org/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 <i.uhnak@gmail.com>:
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
participants (2)
-
Hernán Morales Durand -
Peter Uhnak