
18 Sep
2009
18 Sep
'09
5:14 p.m.
Snouser wrote:
I need to generate a random string from 1 to 30.
This is the parts I've done so far.
unikString xs | let x = unsafePerformIO (randomRIO (1,30)) elem x xs = x : unikString xs | otherwise = unikString xs
How do I proceed?
I need the string/list to look like this:
[1,9,3,6,2] et.c with only unik numbers.
Thanks!
I wasnt added to the mailinglist, but now I'm. -- View this message in context: http://www.nabble.com/How-to-generate-random-string--tp25512293p25512298.htm... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.