In scheme I have to use random to define a procedure that accepts no arguments and returns an integer in the range 1 to 10, inclusive and i cant use if. im lost =(
相关问题
- Do the Java Integer and Double objects have unnece
- Unity - Get Random Color at Spawning
- Generating powerset in one function, no explicit r
- What is fixed point?
- How to generate a random number, then display it o
相关文章
- why 48 bit seed in util Random class?
- Need help generating discrete random numbers from
- Does learning one Lisp help in learning the other?
- Python - arranging words in alphabetical order
- Get random records with Doctrine
- What is the definition of “natural recursion”?
- Looking for a fast hash-function
- Oracle random row from table
If your Scheme provides a
random
function, you want eitheror
depending on whether you have
(random n) --> integer in [0, n-1])
or(random) -> float in [0,1]
Be advised that this isn't standards-compliant. For absolute portability, write your own RNG.