April 11, 2015
5:05 p.m.
Ah, I came to discover OrderedIdentityDictionary. After all, the most efficient is what you don't need to do. Hilaire Le 11/04/2015 18:41, Hilaire a écrit :
Dear all,
From a dictionary, I want the keys sorted according to the values (string). I came with this method:
keysSortedByValue ^ (self associations sort: [ :assoc1 :assoc2 | assoc1 value < assoc2 value ]) collect: [ :assoc | assoc key ]
Is there better way to deal with it, in term of efficiency?
Thanks
Hilaire
-- Dr. Geo - http://drgeo.eu iStoa - http://istoa.drgeo.eu