Interval.st
changeset 16709 447e55afc5fe
parent 14129 b0b377ad4df1
child 16722 bd92f75ab297
equal deleted inserted replaced
16708:79ae980f5e73 16709:447e55afc5fe
   290      which is slow for intervals"
   290      which is slow for intervals"
   291 
   291 
   292     |elementValue mySize newCollection|
   292     |elementValue mySize newCollection|
   293 
   293 
   294     elementValue := start.
   294     elementValue := start.
   295     newCollection := self species withSize:(mySize := self size).
   295     newCollection := self species newWithSize:(mySize := self size).
   296     1 to: mySize do:[:i |
   296     1 to: mySize do:[:i |
   297         newCollection at:i put:(aBlock value:elementValue).
   297         newCollection at:i put:(aBlock value:elementValue).
   298         elementValue := elementValue + step.
   298         elementValue := elementValue + step.
   299     ].
   299     ].
   300     ^ newCollection    
   300     ^ newCollection    
   387     "
   387     "
   388 
   388 
   389     "Modified: / 22-10-2008 / 12:47:41 / cg"
   389     "Modified: / 22-10-2008 / 12:47:41 / cg"
   390 ! !
   390 ! !
   391 
   391 
       
   392 
   392 !Interval methodsFor:'printing & storing'!
   393 !Interval methodsFor:'printing & storing'!
   393 
   394 
   394 displayOn:aGCOrStream
   395 displayOn:aGCOrStream
   395 
   396 
   396     "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
   397     "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
   686 ! !
   687 ! !
   687 
   688 
   688 !Interval class methodsFor:'documentation'!
   689 !Interval class methodsFor:'documentation'!
   689 
   690 
   690 version
   691 version
   691     ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.54 2012-05-04 11:04:15 cg Exp $'
   692     ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.55 2014-07-09 15:05:27 cg Exp $'
   692 !
   693 !
   693 
   694 
   694 version_CVS
   695 version_CVS
   695     ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.54 2012-05-04 11:04:15 cg Exp $'
   696     ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.55 2014-07-09 15:05:27 cg Exp $'
   696 ! !
   697 ! !
       
   698