The Inbox: Collections-ct.856.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Collections-ct.856.mcz

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

==================== 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: []!