|
Re: [FIX] SortedCollectionFix-sr: msg#00728lang.smalltalk.squeak.general
Richard A. O'Keefe wrote: <...> > While anyone's looking at SortedCollection, consider > > #(3 1 4 1 5 9 2 6 5 3 5) asSortedCollection reversed > The result prints as > a SortedCollection (9 6 5 5 5 4 3 3 2 1 1) > but has sortBlock nil, so the order disagrees with the sortBlock. > #reversed does make sense for SortedCollections; it ought to return > a collection with the opposite comparison. > > There may be a problem: if you apply >>reversed multiple times the opposite comparison sortBlock becomes bigger and bigger, if the implementation just inverts it by constructing a new one with sending #not to the old. There are other implementations possible, though. Greetings, Stephan -- Stephan Rudlof (sr@xxxxxxxxx) "Genius doesn't work on an assembly line basis. You can't simply say, 'Today I will be brilliant.'" -- Kirk, "The Ultimate Computer", stardate 4731.3
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [FIX] SortedCollectionFix-sr, Stephan Rudlof |
|---|---|
| Next by Date: | RE: [FIX] SortedCollectionFix-sr, Andreas Raab |
| Previous by Thread: | RE: [FIX] SortedCollectionFix-sr, Ian Piumarta |
| Next by Thread: | Re: [FIX] SortedCollectionFix-sr, Stephan Rudlof |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |