- exact-integer-complex-generatorprocedure
Create an infinite generator that returns objects that fulfill the exact? and complex? predicates. The real and imaginary parts of the complex numbers must be exact integers. The generator should return the sequence
0 1 -1 0+i 0-i 1+i 1-i -1+i -1-i
first, then a uniformly random distribution of exact complex numbers with integer components. Elements of the above sequence may be omitted if they are not distinguished in the implementation.
(define exact-int-comp-gen (exact-integer-complex-generator)) (exact-int-comp-gen) ; => 0