In addition to the bug I filed on this egg - http://trac.callcc.org/ticket/346
I have a question about common usage of this module. I would like to produce one function, roll-fixed, which produces pseudorandom numbers in the documented fashion of random-real and random in SRFI-27. Such that the sequence of randoms (over a uniform distribution) is predictable on each new startup of the intepreter: (define *fixed-seed* (expt 7 5)) (define roll-fixed (let ([side-effect (set-seed *fixed-seed*)]) (lambda (n) (if (zero? n) (random-real-based-on-fixed-seed) (random-integer-based-on-fixed-seed n))))) Additionally, I would like a function, roll-truly-random, which again can produce reals or integer randoms, but whose sequence of randoms (over a uniform distribution) is different across each new startup of the interpreter. (define roll-truly-random (let ([side-effect (set-seed (truly-random-seed))]) (lambda (n) (if (zero? n) (random-real-based-on-truly-random-seed) (random-integer-based-on-truly-random-seed n))))) I'm sorry to beg for such hand-holding, but it seems like the Issues section of the docs does admit that this library could use a few good examples. It also mentions that the API creates something of a hurdle for my desire to have two distinct random structures available in two distinct functions. _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users