&optional
random-state → random-numberReturns a pseudo-random number that is a non-negative number less than limit and of the same type as limit.
The random-state, which is modified by this function, encodes the internal state maintained by the random number generator.
An approximately uniform choice distribution is used. If limit is an integer, each of the possible results occurs with (approximate) probability 1/limit
.
(<= 0 (random 1000) 1000)
→(let ((state1 (make-random-state)) (state2 (make-random-state))) (= (random 1000 state1) (random 1000 state2)))
→
The random-state is modified.
None.
See Common Lisp the Language for information about generating random numbers.