import .interval.Interval extend Integer method asInteger self method printOn: stream stream writeUTF8: self toString method displayOn: stream self printOn: stream method to: other self to: other by: 1 method to: other by: step Interval from: self to: other by: step method to: other do: block let i = self. { i <= other } whileTrue: { block value: i. i = i + 1 }. self method times: block let i = 0. { i < self } whileTrue: { block value. i = i + 1 }. self method + x x addInteger: self method - x x subInteger: self method * x x mulInteger: self method / x x divInteger: self method square self mulInteger: self method == x x equalInteger: self method < x x greaterThanInteger: self method > x x lessThanInteger: self method <= x x greaterThanOrEqualInteger: self method >= x x lessThanOrEqualInteger: self method addFloat: x self asFloat addFloat: x method subFloat: x self asFloat subFloat: x method mulFloat: x self asFloat mulFloat: x method divFloat: x self asFloat divFloat: x method addArray: x x collect: { |elt| elt addInteger: self } method mulArray: x x collect: { |elt| elt mulInteger: self } method subArray: x x collect: { |elt| elt - self } method divArray: x x collect: { |elt| elt / self } method equalFloat: x self asFloat equalFloat: x method greaterThanFloat: x self asFloat greaterThanFloat: x method greaterThanOrEqualFloat: x self asFloat greaterThanOrEqualFloat: x method lessThanFloat: x self asFloat lessThanFloat: x method lessThanOrEqualFloat: x self asFloat lessThanOrEqualFloat: x end