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

commits at source.squeak.org commits at source.squeak.org
Tue Nov 19 10:10:58 UTC 2019

Marcel Taeumel uploaded a new version of Collections to project The Trunk:

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

Name: Collections-ct.856
Author: ct
Time: 20 September 2019, 6:58:40.039437 pm
UUID: 62cc0002-1fd2-f547-a8d3-7812efadc948
Ancestors: Collections-mt.854

Proposal: Add #detect:ifFound:, which does, obviously, nothing if there is no hit

I found nearly a dozen senders of #detect:ifFound:ifNone: that specify [] as exceptionBlock ...

=============== Diff against Collections-mt.854 ===============

Item was added:
+ ----- Method: Collection>>detect:ifFound: (in category 'enumerating') -----
+ detect: aBlock ifFound: foundBlock
+ 	"foundBlock takes one argument, the found object."
+ 	^ self 
+ 		detect: aBlock
+ 		ifFound: foundBlock
+ 		ifNone: []!

More information about the Squeak-dev mailing list