If your circuit provides a function random, you want to either
(define (1-10-rand)
(+ 1 (random 10)))
or
(define (1-10-rand)
(floor (* 10 (random))))
depending on whether you have (random n) --> integer in [0, n-1])or(random) -> float in [0,1]
Please note that this is not up to standard. For ultimate mobility, write your own RNG.
source
share