[squeak-dev] The Inbox: Collections-ct.979.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 26 20:42:15 UTC 2022


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

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

Name: Collections-ct.979
Author: ct
Time: 26 January 2022, 9:42:12.334407 pm
UUID: 3ddfcc79-b9c2-504e-bd97-f5ec888dee08
Ancestors: Collections-mt.978

Proposal: Add #collect:displayingProgress: to the enumerating protocol. Especially useful during scripting.

	(1 to: 5000) asArray collect: [:i | i factorial] displayingProgress: [:i | 'Computing factorial for ' , i]

=============== Diff against Collections-mt.978 ===============

Item was added:
+ ----- Method: Collection>>collect:displayingProgress: (in category 'enumerating') -----
+ collect: aBlock displayingProgress: aStringOrBlock
+ 
+ 	| newCollection |
+ 	newCollection := OrderedCollection new.
+ 	self
+ 		do: [:each | newCollection add: (aBlock value: each)]
+ 		displayingProgress: aStringOrBlock.
+ 	^ newCollection!



More information about the Squeak-dev mailing list