Files
linguist/samples/Clojure/rand.cljscm
2013-11-05 15:33:05 +07:00

5 lines
162 B
Clojure

(defn rand
"Returns a random floating point number between 0 (inclusive) and
n (default 1) (exclusive)."
([] (scm* [n] (random-real)))
([n] (* (rand) n)))