On Fri Feb 18 15:38 2011, Alan wrote: > user=> (take 100 (distinct (repeatedly #(rand-int 200)))) > (100 55 65 188 90 150 144 72 137 74 187 158 163 28 140 146 111 116 135 > 88 29 81 36 173 149 79 16 105 82 162 60 20 49 50 91 176 165 3 56 22 9 > 85 44 101 33 134 186 128 141 103 92 143 123 23 129 83 80 5 172 179 166 > 167 66 195 99 164 38 138 148 130 6 155 32 175 120 18 197 190 78 19 46 > 7 77 68 76 189 63 27 4 43 24 183 122 51 95 157 153 156 199 110) > > Adjust this for whatever random-generator you want to use.
To realise the sequence and keep the results, use (doall). Hence: (doall (take 100 (distinct (repeatedly #(format "%.2f" (rand 100.0)))))) Sincerely, Daniel Solano Gómez
pgp9eJJGtbuU0.pgp
Description: PGP signature