--- a/SequenceableCollection.st Wed Dec 02 11:57:08 2015 +0100
+++ b/SequenceableCollection.st Fri Dec 04 10:53:17 2015 +0100
@@ -398,6 +398,7 @@
^ self == SequenceableCollection
! !
+
!SequenceableCollection methodsFor:'Compatibility-Squeak'!
allButFirst
@@ -2181,25 +2182,29 @@
|stop "{ Class: SmallInteger }" |
- (aCollection == self) ifTrue:[^true].
+ (aCollection == self) ifTrue:[^ true].
(aCollection isSequenceable) ifFalse:[
+ aCollection isNil ifTrue:[^ false].
^ aCollection sameContentsAs:self.
].
stop := self size.
- stop == (aCollection size) ifFalse:[^false].
+ stop ~~ (aCollection size) ifTrue:[^ false].
1 to:stop do:[:index|
- ((self at:index) = (aCollection at:index)) ifFalse:[^ false].
+ ((self at:index) ~= (aCollection at:index)) ifTrue:[^ false].
].
^ true
"
#(1 2 3 4 5) sameContentsAs: #(1 2 3 4 5) copy
+ #(1 2 3 4 5) sameContentsAs: #(1 2 3 4)
+ #(1 2 3 4 5) sameContentsAs: #(1 2 3 4 5) asSet
#(1 2 3 4 5) asSet sameContentsAs: #(1 2 3 4 5) copy
#($1 $2 $3 $4 $5) sameContentsAs: #(1 2 3 4 5)
#($1 $2 $3 $4 $5) sameContentsAs: '12345'
#($1 $2 $3 $4 $5) sameContentsAs: '54321' asSortedCollection
+ #(1 2 3 4 5) sameContentsAs: nil
"
"Created: / 09-07-2010 / 12:44:28 / sr"
@@ -7681,6 +7686,7 @@
"Created: 14.2.1997 / 16:13:03 / cg"
! !
+
!SequenceableCollection methodsFor:'searching'!
detect:aBlock startingAt:startIndex