On Tue, Aug 25, 2009 at 7:56 PM, Jonathan Smith
<jonathansmith...@gmail.com>wrote:

>
> I would have worried that if dim and max were close you'd get to the
> last number and keep calling #(rand-int) and never hit the last
> number.
>
> how does distinct work that it keeps that situation from occuring?


(make-random-numbers 10 10) works but (make-random-numbers 11 10) hangs
(trying to get 11 unique integers between 0 and 9...).

My solution works better when dim << max and yous works better when dim is
close to max.

Christophe

--~--~---------~--~----~------------~-------~--~----~
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
Note that posts from new members are moderated - please be patient with your 
first post.
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