user=> (rand-int 30) 10 user=> (rand-int 30) 7 ;compare with user=> (int (rand 30))
Returns a random floating point number between 0 (inclusive) and n
Coerce to int
(defn rand-int "Returns a random integer between 0 (inclusive) and n (exclusive)." {:added "1.0" :static true} [n] (int (rand n)))
Comments top
No comments for rand-int. Log in to add a comment.