Interval.st
changeset 216 a8abff749575
parent 92 0c73b48551ac
child 269 93162487a94b
--- a/Interval.st	Thu Feb 02 13:13:16 1995 +0100
+++ b/Interval.st	Thu Feb 02 13:23:05 1995 +0100
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -19,9 +19,9 @@
 
 Interval comment:'
 COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.10 1994-08-05 00:55:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.11 1995-02-02 12:21:18 claus Exp $
 '!
 
 !Interval class methodsFor:'documentation'!
@@ -29,7 +29,7 @@
 copyright
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.10 1994-08-05 00:55:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.11 1995-02-02 12:21:18 claus Exp $
 "
 !
 
@@ -135,13 +135,13 @@
     "return the number of elements in the collection"
 
     (step < 0) ifTrue:[
-        (start < stop) ifTrue:[
-            ^ 0
-        ].
-        ^ stop - start // step + 1
+	(start < stop) ifTrue:[
+	    ^ 0
+	].
+	^ stop - start // step + 1
     ].
     (stop < start) ifTrue:[
-        ^ 0
+	^ 0
     ].
     ^ stop - start // step + 1
 !
@@ -150,7 +150,7 @@
     "return (i.e. compute) the index'th element"
 
     (index between:1 and:self size) ifTrue:[
-        ^ start + (step * (index - 1))
+	^ start + (step * (index - 1))
     ].
     self errorSubscriptBounds:index
 !
@@ -196,8 +196,8 @@
     aStream nextPutAll:' to:'.
     stop printOn:aStream.
     step ~= 1 ifTrue:[
-        aStream nextPutAll:' by:'.
-        step printOn:aStream.
+	aStream nextPutAll:' by:'.
+	step printOn:aStream.
     ].
 
     "(1 to:10) printOn:Transcript"
@@ -216,7 +216,7 @@
     "(1 to:10 by:2) storeOn:Transcript"
 ! !
 
-!Interval methodsFor:'enumeration'!
+!Interval methodsFor:'enumerating'!
 
 do:aBlock
     "evaluate the argument, aBlock for every element in the
@@ -226,15 +226,15 @@
 
     aValue := start.
     step < 0 ifTrue:[
-        [stop <= aValue] whileTrue:[
-            aBlock value:aValue.
-            aValue := aValue + step
-        ]
+	[stop <= aValue] whileTrue:[
+	    aBlock value:aValue.
+	    aValue := aValue + step
+	]
     ] ifFalse:[
-        [stop >= aValue] whileTrue:[
-            aBlock value:aValue.
-            aValue := aValue + step
-        ]
+	[stop >= aValue] whileTrue:[
+	    aBlock value:aValue.
+	    aValue := aValue + step
+	]
     ]
 !
 
@@ -248,7 +248,7 @@
 
     newColl := self species new:(self size).
     self do:[:each |
-        (aBlock value:each) ifTrue:[newColl add:each]
+	(aBlock value:each) ifTrue:[newColl add:each]
     ].
     ^ newColl
 !
@@ -262,7 +262,7 @@
 
     newCollection := self species new:(self size).
     self do:[:each |
-        newCollection add:(aBlock value:each)
+	newCollection add:(aBlock value:each)
     ].
     ^ newCollection
 ! !