[Pkg] The Trunk: Collections-ul.381.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Sep 12 02:37:46 UTC 2010


Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.381.mcz

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

Name: Collections-ul.381
Author: ul
Time: 12 September 2010, 4:35:03.62 am
UUID: 2198e33c-0e2b-cb4e-b54d-5c4a7febb57a
Ancestors: Collections-ul.380

- simplified SequenceableCollection >> #indexOf:startingAt:

=============== Diff against Collections-ul.380 ===============

Item was changed:
  ----- Method: SequenceableCollection>>indexOf:startingAt: (in category 'accessing') -----
  indexOf: anElement startingAt: start
  	"Answer the index of the first occurence of anElement after start
  	within the receiver. If the receiver does not contain anElement, 
  	answer 0."
  
+ 	^self indexOf: anElement startingAt: start ifAbsent: 0!
- 	| index endIndex |
- 	index := start.
- 	endIndex := self size.
- 	[ index <= endIndex ] whileTrue: [
- 		(self at: index) = anElement ifTrue: [ ^index ].
- 		index := index + 1 ].
- 	^0!



More information about the Packages mailing list