> user=> (repeat 10 (rand-int 49))
> (4 4 4 4 4 4 4 4 4 4)

Hi,
(rand-int 49) will produce one integer, and repeat will repeat it 10
times, that is why you see same number repeated.

To fix this use:
user=> (take 10 (repeatedly #(rand-int 49)))
(21 29 9 20 15 34 8 28 16 26)

--
Krešimir Šojat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to