[squeak-dev] The Inbox: Collections-mt.846.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jul 22 13:34:39 UTC 2019


A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-mt.846.mcz

==================== Summary ====================

Name: Collections-mt.846
Author: mt
Time: 22 July 2019, 3:34:37.445967 pm
UUID: 32e5abfd-9153-4a57-b404-7c11380ccbd0
Ancestors: Collections-mt.845

Here is an idea to make this work:

#(1 1 2 2 3 4) asSet collect: [:ea | ea -> ea] as: Dictionary

See inbox CollectionsTests-pre.314.mcz. Not as fast as before, though. :-)

=============== Diff against Collections-mt.845 ===============

Item was changed:
  ----- Method: Collection>>fillFrom:with: (in category 'private') -----
  fillFrom: aCollection with: aBlock
  	"Evaluate aBlock with each of aCollections's elements as the argument.  
  	Collect the resulting values into self. Answer self."
  
+ 	aCollection associationsDo: [ :each |
- 	aCollection do: [ :each |
  		self add: (aBlock value: each) ]!

Item was removed:
- ----- Method: Dictionary>>fillFrom:with: (in category 'private') -----
- fillFrom: aCollection with: aBlock
- 	"Evaluate aBlock with each of aCollections's elements as the argument.  
- 	Collect the resulting values into self. Answer self."
- 
- 	aCollection isSequenceable
- 		ifTrue:
- 			[aCollection associationsDo:
- 				[ :element | self add: (aBlock value: element)]]
- 		ifFalse:
- 			[aCollection keysAndValuesDo:
- 				[ :key :value | self at: key put: (aBlock value: value)]]!

Item was added:
+ ----- Method: Dictionary>>histogramOf: (in category 'converting') -----
+ histogramOf: aBlock
+ 
+ 	^ self collect: [:assoc | aBlock value: assoc value] as: Bag!



More information about the Squeak-dev mailing list