| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
<complex> inherits <number>, <real> inherits
<complex> and <integer> inherits <real>.
Note that these classes does not exactly corresponds to the
number hierarchy defined in R5RS. Especially,
only exact integers are the instances of the <integer>
class. That is,
(integer? 1) => #t (is-a? 1 <integer>) => #t (is-a? 1 <real>) => #t (integer? 1.0) => #t (is-a? 1.0 <integer>) => #f (is-a? 1.0 <real>) => #t (class-of (expt 2 100)) => #<class <integer>> (class-of (sqrt -3)) => #<class <complex>> |