# HG changeset patch # User Claus Gittinger # Date 1330519760 -3600 # Node ID 9fdd8832d8712de6fcc7093becd675db3b3b6b4d # Parent 0a7d1b52002c5641ed0b714ff7df97a012625783 added: #from:to:doWithIndex: comment/format in: #doWithIndex: diff -r 0a7d1b52002c -r 9fdd8832d871 SequenceableCollection.st --- a/SequenceableCollection.st Wed Feb 29 11:58:23 2012 +0100 +++ b/SequenceableCollection.st Wed Feb 29 13:49:20 2012 +0100 @@ -4182,14 +4182,12 @@ ! doWithIndex:aBlock - "Squeak compatibility; like keysAndValuesDo:, but passes - the index as second argument." - - self keysAndValuesDo:[:index :value | - aBlock value:value value:index - ]. - - "Created: 17.10.1997 / 12:33:10 / cg" + "Squeak/V'Age compatibility; + like keysAndValuesDo:, but passes the index as second argument." + + self keysAndValuesDo:[:index :el | aBlock value:el value:index]. + + "Created: / 17-10-1997 / 12:33:10 / cg" ! from:start collect:aBlock @@ -4303,6 +4301,15 @@ "Modified: / 02-06-2011 / 13:23:06 / cg" ! +from:index1 to:index2 doWithIndex:aBlock + "Squeak/V'Age compatibility; + like keysAndValuesDo:, but passes the index as second argument." + + self from:index1 to:index2 keysAndValuesDo:[:index :el | aBlock value:el value:index]. + + "Created: / 29-02-2012 / 11:47:48 / cg" +! + from:index1 to:index2 keysAndValuesDo:aBlock "evaluate the argument, aBlock for the elements with index index1 to index2 in the collection; pass both index and value." @@ -7989,7 +7996,7 @@ !SequenceableCollection class methodsFor:'documentation'! version_CVS - ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.312 2012-02-14 13:22:17 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.313 2012-02-29 12:49:20 cg Exp $' ! ! SequenceableCollection initialize!