chickadee » srfi-252 » exact-real-generator

exact-real-generatorprocedure

Create an infinite generator that returns objects that fulfill the exact? and real? predicates. The generator should return the sequence

    0 1 -1 1/2 -1/2

first, then a uniformly random distribution of exact real numbers. Elements of the above sequence may be omitted if they are not distinguished in the implementation.

    (define exact-real-gen (exact-real-generator))

    (exact-real-gen) ; => 0