--- a/SeqColl.st Mon Oct 04 11:32:33 1993 +0100
+++ b/SeqColl.st Wed Oct 13 01:19:00 1993 +0100
@@ -26,7 +26,7 @@
an index. SequenceableCollection is an abstract class - there are no
instances of it in the system.
-%W% %E%
+$Header: /cvs/stx/stx/libbasic/Attic/SeqColl.st,v 1.3 1993-10-13 00:18:03 claus Exp $
written spring 89 by claus
'!
@@ -870,6 +870,21 @@
]
!
+keysAndValuesDo:aTwoArgBlock
+ "evaluate the argument, aBlock for every element in the collection,
+ passing both index and element as arguments."
+
+ |index "{ Class:SmallInteger }"
+ length "{ Class:SmallInteger }"|
+
+ index := 1.
+ length := self size.
+ [index <= length] whileTrue:[
+ aTwoArgBlock value:index value:(self at:index).
+ index := index + 1
+ ]
+!
+
from:index1 to:index2 do:aBlock
"evaluate the argument, aBlock for the elements with index index1 to
index2 in the collection"