Permalink
Fetching contributors…
Cannot retrieve contributors at this time
|
; P24 Lotto: Draw N different random numbers from the set 1..M. |
|
|
|
; The obvious answer is (P23/f1 n (range 1 m)) |
|
; Let's use "distinct" for a different solution |
|
(defn f1 [n m] |
|
(take n (distinct (repeatedly #(inc (rand-int m)))))) |
You can't perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.