[squeak-dev] The Trunk: Collections-ct.980.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Thu Jan 27 10:13:17 UTC 2022

Hi Christoph --

I don't think that we should port all convenience methods from Collection to here. Just the core. At least, that was my thinking, when I added the "collections - enumerating" back then. I deliberately chose not to add such things to not bloat the Stream interface any further.

Am 26.01.2022 21:46:25 schrieb commits at source.squeak.org <commits at source.squeak.org>:
Christoph Thiede uploaded a new version of Collections to project The Trunk:

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

Name: Collections-ct.980
Author: ct
Time: 26 January 2022, 9:46:11.770407 pm
UUID: 465bffe2-5612-4c40-974b-33bd5ec2dbbd
Ancestors: Collections-mt.978

Improves polymorphy between Collection and Stream by adding missing convenience selectors on the latter. We already have #select:thenCollect: there, so this is just a logical complement.

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

Item was added:
+ ----- Method: Stream>>collect:thenDo: (in category 'collections - enumerating') -----
+ collect: collectBlock thenDo: doBlock
+ ^ (self collect: collectBlock) do: doBlock!

Item was added:
+ ----- Method: Stream>>collect:thenSelect: (in category 'collections - enumerating') -----
+ collect: collectBlock thenSelect: selectBlock
+ ^ (self collect: collectBlock) select: selectBlock!

Item was added:
+ ----- Method: Stream>>reject:thenDo: (in category 'collections - enumerating') -----
+ reject: rejectBlock thenDo: doBlock
+ ^ (self reject: rejectBlock) do: doBlock!

Item was added:
+ ----- Method: Stream>>select:thenDo: (in category 'collections - enumerating') -----
+ select: selectBlock thenDo: doBlock
+ ^ (self select: selectBlock) do: doBlock!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220127/2659c3f6/attachment-0001.html>

More information about the Squeak-dev mailing list