class Interval { from to by } method do: block let i = from. { i <= to } whileTrue: { block value: i. i = i + by }. self method size by == 1 ifTrue: { 1 + to - from } ifFalse: { (1 + to - from) asInteger / by } method displayOn: stream by == 1 ifTrue: { stream print: "#" } ifFalse: { stream print: "#" } method printOn: stream self displayOn: stream end