I played a bit with RunArray, and found some un-optimized features.
First, I don't know why RunArray is an ArrayedCollection. It cannot
#add: but it can #addFirst: and #addLast:.
It cannot #add:withOccurrences: but it can #addLast:times:. Why
inventing new selectors for old behaviours ?
These
To complete myself, the fast #collect: already exists and is named
#mapValues: except that it modifies the RunArray in place and also
won't coalesce...
I also gain a huge factor for #collect:as: be defining this method:
RunArrayfillFrom: aCollection with: aBlock
Evaluate aBlock with each
Excellent!
Stef
On Aug 2, 2011, at 12:11 PM, Nicolas Cellier wrote:
To complete myself, the fast #collect: already exists and is named
#mapValues: except that it modifies the RunArray in place and also
won't coalesce...
I also gain a huge factor for #collect:as: be defining this method: