Clojure rand functions

user=> (int (rand 30))
7
user=> (rand-int 30)
27
user=> (rand-int 30)
22
user=> (rand-int 30)
5
user=> (int (rand 30))
1
user=> (class (rand-int 30))
java.lang.Integer
user=> (class? (class (rand-int 30)))
true
user=> (class (rand-int 30))
java.lang.Integer
user=> (class (rand 30))
java.lang.Double
user=> (rand 30)
19.621949245691273
user=> (rand 30)
7.605436636946078
user=> (rand 30)
28.664014879249944
user=> (rand-int 55)
37
user=> (rand-int 55)
48
user=> (rand-int 55)
27
user=> (rand-int 55)
50
user=> (rand-int 55)
54
user=> (rand-int 5555)
4969

Here are some examples of Clojure random functions.

 

You’re welcome.

There are 63 words in this article.