[Haskell-cafe] Re: working with Random.randoms

Robert Vollmert rvollmert-lists at gmx.net
Sun Jun 15 04:03:03 EDT 2008

Great reply!

One minor point: If real_programme is to be pure, you should use let:

On Jun 14, 2008, at 12:30, Jon Fairbairn wrote:
> main :: IO()
>   do gen <- getStdGen
>      the_list <- real_programme gen
       let the_list = real_programme gen
>      print the_list
> You should be able to deduce from the fact that the first
> argument of real_programme here is of type StdGen (not IO
> anything) and its result type is [something] that
> real_programme is pure, and gen has only one value
> throughout.


More information about the Haskell-Cafe mailing list