--- a/RunArray.st Sat Aug 08 11:30:22 2015 +0200
+++ b/RunArray.st Sat Aug 08 16:30:07 2015 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
This class is not covered by or part of the ST/X licence.
@@ -26,6 +28,8 @@
"
"{ Package: 'stx:libbasic2' }"
+"{ NameSpace: Smalltalk }"
+
SequenceableCollection subclass:#RunArray
instanceVariableNames:'contentsArray'
classVariableNames:''
@@ -877,6 +881,17 @@
^ true
!
+contains:aBlock
+ "Return true, if aBlock returns true for any of the receiver's elements"
+
+ contentsArray notNil ifTrue:[
+ contentsArray pairWiseDo:[:len :val |
+ (aBlock value:val) ifTrue:[^ true].
+ ].
+ ].
+ ^ false
+!
+
do:aBlock
"Evaluate aBlock with each of the receiver's elements as the
argument. "
@@ -891,8 +906,8 @@
!
runsDo:aBlock
- "Evaluate aBlock with each of the receiver's runs, passing
- length and value as arguments."
+ "Evaluate aBlock with each of the receiver's runs,
+ passing length and value as arguments."
contentsArray notNil ifTrue:[
contentsArray pairWiseDo:aBlock
@@ -916,6 +931,7 @@
]
! !
+
!RunArray methodsFor:'printing & storing'!
displayOn:aGCOrStream
@@ -1382,14 +1398,13 @@
"Modified: 11.5.1996 / 13:35:17 / cg"
! !
-
!RunArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/RunArray.st,v 1.37 2014-07-10 12:24:08 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic2/RunArray.st,v 1.37 2014-07-10 12:24:08 cg Exp $'
+ ^ '$Header$'
! !