[Haskell-cafe] How to generate random string?
linusoleander at gmail.com
Fri Sep 18 13:14:53 EDT 2009
> 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.
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.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe