--- a/OrdColl.st Mon Oct 04 11:32:33 1993 +0100
+++ b/OrdColl.st Wed Oct 13 01:19:00 1993 +0100
@@ -31,7 +31,7 @@
firstIndex <SmallInteger> index of first valid element
lastIndex <SmallInteger> index of last valid element
-%W% %E%
+$Header: /cvs/stx/stx/libbasic/Attic/OrdColl.st,v 1.3 1993-10-13 00:16:51 claus Exp $
written spring 89 by claus
'!
@@ -356,6 +356,15 @@
contentsArray from:firstIndex to:lastIndex do:aBlock
!
+keysAndValuesDo:aTwoArgBlock
+ "evaluate the argument, aBlock for every element in the collection,
+ passing both index and element as arguments."
+
+ firstIndex to:lastIndex do:[:index |
+ aTwoArgBlock value:index value:(contentsArray at:index)
+ ]
+!
+
collect:aBlock
"evaluate the argument, aBlock for every element in the collection
and return a collection of the results"