added: #from:to:doWithIndex:
authorClaus Gittinger <cg@exept.de>
Wed, 29 Feb 2012 13:49:20 +0100
changeset 14029 9fdd8832d871
parent 14028 0a7d1b52002c
child 14030 204e77eae2d3
added: #from:to:doWithIndex: comment/format in: #doWithIndex:
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!