Simple types / Numbers / Integer

(def rand1 (rand-int 3))
;; rand1 is 0, 1 or 2 but never 3

(def rand2 (rand-nth [1 2 3]))
;; rand2 is 1, 2 or 3

;; the value differs on every run, so check the range instead of printing it
(println "rand1 in #{0 1 2} is" (contains? #{0 1 2} rand1))
(println "rand2 in #{1 2 3} is" (contains? #{1 2 3} rand2))

;; a shuffled deck keeps every element, only the order changes
(println "shuffle keeps the items is" (= #{1 2 3 4 5(set (shuffle (
                          range 1 6)))))