[Haskell-cafe] Random this! ;-)

Max Rabkin max.rabkin at gmail.com
Sun Jul 25 11:44:49 EDT 2010


On Sun, Jul 25, 2010 at 5:39 PM, michael rice <nowgate at yahoo.com> wrote:
>
> I know, ugly, but at least I got it to work. What's a better way to generate this list?

rollNDiceIO n
   = sequence . replicate n $ randomRIO (1,6)
{{ sequence . replicate n = replicateM n }}
   = replicateM n $ randomRIO (1, 6)

--Max


More information about the Haskell-Cafe mailing list