--- a/SequenceableCollection.st Fri Jul 29 21:39:49 2016 +0100
+++ b/SequenceableCollection.st Fri Jul 29 21:40:03 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -452,7 +450,6 @@
! !
-
!SequenceableCollection methodsFor:'Compatibility-Squeak'!
allButFirst
@@ -1142,10 +1139,10 @@
"append the argument, anObject to the collection.
Return the argument, anObject.
- Notice, that this is modifies the receiver NOT a copy.
- Also note, that it may be a slow operation for some collections,
+ Notice that this modifies the receiver, NOT a copy.
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
|newSize|
@@ -1172,10 +1169,10 @@
"insert the first argument, anObject into the collection before slot index.
Return the receiver (sigh - ST-80 compatibility).
- Notice, that this is modifies the receiver NOT a copy.
- Also note, that it may be a slow operation for some collections,
+ Notice that this modifies the receiver, NOT a copy.
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
|newSize|
@@ -1238,10 +1235,10 @@
"prepend the argument, anObject to the collection.
Return the argument, anObject.
- Notice, that this is modifies the receiver NOT a copy.
- Also note, that it may be a slow operation for some collections,
+ Notice that this modifies the receiver, NOT a copy.
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
|newSize|
@@ -1266,16 +1263,16 @@
!
remove:anElement ifAbsent:aBlock
- "search for the first occurrrence of object
+ "search for the first occurrence of object
(i.e. which is equal to anElement)
- If found remove and return it;
+ If found remove and return it;
if not, return the value from evaluating aBlock.
Use equality compare (=) to search for an occurrence.
- Notice, that this is modifies the receiver NOT a copy.
- Also note, that it may be a slow operation for some collections,
+ Notice that this modifies the receiver, NOT a copy.
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
|any foundElement
dstIndex "{ Class: SmallInteger }"
@@ -1289,7 +1286,7 @@
(anElement = (foundElement := self at:srcIndex)) ifTrue:[
any := true.
dstIndex := srcIndex.
- ]
+ ]
] ifTrue:[
"/ already copying
self at:dstIndex put:(self at:srcIndex).
@@ -1362,10 +1359,10 @@
removeAtIndex:anIndex
"remove the element stored at anIndex. Return the removed object.
- Notice, that this is modifies the receiver NOT a copy.
- Also note, that it may be a slow operation for some collections,
+ Notice that this modifies the receiver, NOT a copy.
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
|element|
@@ -1383,10 +1380,10 @@
removeFirst
"remove the first element of the receiver and return it.
- Notice, that this is modifies the receiver NOT a copy.
- Also note, that it may be a slow operation for some collections,
+ Notice that this modifies the receiver, NOT a copy.
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
^ self removeAtIndex:1
@@ -1404,11 +1401,11 @@
Returning the receiver is a historic leftover - it may at one
time return a collection of the removed elements.
- Notice, that this is modifies the receiver - NOT a copy;
+ Notice that this modifies the receiver, NOT a copy;
therefore any other users of the receiver will also see this change.
- Also note, that it may be a slow operation for some collections,
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
^ self removeFromIndex:startIndex toIndex:(self size)
@@ -1424,11 +1421,11 @@
"remove the elements stored at indexes between startIndex and endIndex.
Return the receiver.
- Notice, that this modifies the receiver - NOT a copy;
+ Notice that this modifies the receiver, NOT a copy;
therefore any other users of the receiver will also see this change.
- Also note, that it may be a slow operation for some collections,
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
|size newSize|
@@ -1463,10 +1460,10 @@
if found remove and return it; if not, return the value from evaluating aBlock.
Uses identity compare (==) to search for an occurrence.
- Notice, that this is modifies the receiver NOT a copy.
- Also note, that it may be a slow operation for some collections,
+ Notice that this modifies the receiver, NOT a copy.
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
|any
dstIndex "{ Class: SmallInteger }"
@@ -1504,10 +1501,10 @@
removeIndex:index
"remove the argument stored at index. Return the receiver.
- Notice, that this is modifies the receiver NOT a copy.
- Also note, that it may be a slow operation for some collections,
+ Notice that this modifies the receiver, NOT a copy.
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
self removeFromIndex:index toIndex:index
@@ -1521,10 +1518,10 @@
removeLast
"remove the last element of the receiver and return it.
- Notice, that this is modifies the receiver NOT a copy.
- Also note, that it may be a slow operation for some collections,
+ Notice that this modifies the receiver, NOT a copy.
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
^ self removeAtIndex:(self size)
@@ -1540,11 +1537,11 @@
"remove the elements stored at indexes from 1 to index to the beginning.
Return the receiver.
- Notice, that this is modifies the receiver - NOT a copy;
+ Notice that this modifies the receiver, NOT a copy;
therefore any other users of the receiver will also see this change.
- Also note, that it may be a slow operation for some collections,
+ Also note that it may be a slow operation for some collections,
due to the grow:-message, which is inefficient for fixed size
- collections (i.e. for Strings and Arrays it is not recommened)."
+ collections (i.e. for Strings and Arrays it is not recommended)."
^ self removeFromIndex:1 toIndex:index