[squeak-dev] The Inbox: Kernel-ct.1266.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Sep 6 11:16:45 UTC 2019
A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-ct.1266.mcz
==================== Summary ====================
Name: Kernel-ct.1266
Author: ct
Time: 6 September 2019, 1:16:39.325698 pm
UUID: a5b0464f-61cf-4749-9ad3-92e7d8c85341
Ancestors: Kernel-eem.1265
Add shorthands for interval collecting
There are enough senders of #timesRepeat: that manually fill a collection, same goes for #to:do:
=============== Diff against Kernel-eem.1265 ===============
Item was added:
+ ----- Method: Integer>>timesCollect: (in category 'enumerating') -----
+ timesCollect: aBlock
+
+ ^ (1 to: self) collect: [:i | aBlock value]!
Item was added:
+ ----- Method: Number>>to:collect: (in category 'intervals') -----
+ to: stop collect: aBlock
+ "Evaluate aBlock for each element of the interval (self to: stop by: 1) and return the results."
+
+ ^ (self to: stop) collect: aBlock!
More information about the Squeak-dev
mailing list
|