title: A list of random doubles within defined range in Haskell?
body: <p>How can I make a list of random numbers of type 'Double', that fit within a defined range? Info on this matter for a newbie like me is a little bit confusing. Trying something like:</p>
  
  <pre><code>randomlist :: Int -&gt; Int -&gt; [IO Double]
  randomlist a b = do
    g &lt;- newStdGen
    return (randomRs (a,b) g)
  </code></pre>
  
  <p>fails, with error:</p>
  
  <pre><code>Couldn't match expected type `[t0]' with actual type `IO StdGen'
  </code></pre>
  
  <p>Could you point to mistakes in my code?</p>