ArrayedCollection.st
changeset 25373 f030619565e1
parent 24785 cf6ee255e9f2
--- a/ArrayedCollection.st	Tue Apr 28 14:41:21 2020 +0200
+++ b/ArrayedCollection.st	Tue Apr 28 16:21:34 2020 +0200
@@ -119,18 +119,17 @@
 !
 
 with:element
-    "return a new SequenceableCollection with one element:anObject"
-
-    |newCollection|
+    "return a new instance with one element:anObject"
 
-    newCollection := self new:1.
-    newCollection at:1 put:element.
-    ^newCollection
+    ^ (self new:1)
+        at:1 put:element;
+        yourself.
 
     "
-     OrderedCollection with:1
-     SortedCollection with:99 
+     Array with:1
     "
+
+    "Modified: / 28-04-2020 / 15:46:35 / Stefan Vogel"
 !
 
 with:first with:second