Collection.st
changeset 23535 ffe068c98121
parent 23520 2ececed7e107
child 23536 a92d5817bb84
--- a/Collection.st	Sun Nov 11 22:44:30 2018 +0100
+++ b/Collection.st	Fri Nov 16 12:22:02 2018 +0100
@@ -2763,7 +2763,7 @@
 
     |newCollection runIndex|
 
-    newCollection := self speciesForCollecting new:self size.
+    newCollection := self speciesForCollecting newWithCapacity:self size.
     runIndex := 1.
     self do:[:element | 
         newCollection add:(aTwoArgBlock value:element value:runIndex).
@@ -2775,6 +2775,8 @@
      #(1 2 3 4) collectWithIndex:[:n :i | n * 2 + i]  
      #(1 2 3 4) collectWithIndex:[:n :i | i -> (n * 2)]  
     "
+
+    "Modified: / 16-11-2018 / 12:20:43 / Maren"
 !
 
 count:aBlock