--- a/Interval.st Mon Dec 15 11:40:14 2008 +0100
+++ b/Interval.st Mon Dec 15 12:48:15 2008 +0100
@@ -39,6 +39,8 @@
Intervals represent a collection (or range) of numeric values specified by
a startValue, an endValue and a step.
The interesting thing is that the elements are computed, not stored.
+ However, protocol-wise, intervals behave like any other (read-only) sequenceable collection.
+
For example, the interval (1 to:5) containes the elements (1 2 3 4 5) and
(1 to:6 by:2) contains (1 3 5).
@@ -66,15 +68,13 @@
!Interval class methodsFor:'instance creation'!
from:start to:stop
- "return a new interval with elements from start
- to stop by 1"
+ "return a new interval with elements from start to stop by 1"
^ self new setFrom:start to:stop by:1
!
from:start to:stop by:step
- "return a new interval with elements from start
- to stop by step"
+ "return a new interval with elements from start to stop by step"
^ self new setFrom:start to:stop by:step
! !
@@ -618,5 +618,5 @@
!Interval class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.46 2008-10-22 10:49:27 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.47 2008-12-15 11:48:15 cg Exp $'
! !