The Trunk: Collections-eem.636.mcz

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

The Trunk: Collections-eem.636.mcz

commits-2
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.636.mcz

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

Name: Collections-eem.636
Author: eem
Time: 29 May 2015, 4:03:27.101 pm
UUID: 0ccecc27-ca23-41aa-be79-584dbc53e4d0
Ancestors: Collections-mt.635

findLast:startingAt: dual for findFirst:startingAt:

=============== Diff against Collections-mt.635 ===============

Item was added:
+ ----- Method: SequenceableCollection>>findLast:startingAt: (in category 'enumerating') -----
+ findLast: aBlock startingAt: i
+ "Return the index of my last element with index >= i for which aBlock evaluates as true."
+
+ | index |
+ index := self size + 1.
+ [(index := index - 1) >= i] whileTrue:
+ [(aBlock value: (self at: index)) ifTrue: [^index]].
+ ^ 0!