title: How do I use newStdGen or getStdGen instead of mkStdGen in haskell
body: <p>Trying to solve <a href="http://www.haskell.org/haskellwiki/99_questions/21_to_28" rel="noreferrer">problem 23</a> of 99 Haskell Problems.</p>
  
  <p>And I wrote this</p>
  
  <pre><code>rnd_select :: (Eq a) =&gt; [a] -&gt; Int -&gt; [a]
  rnd_select [] _ = []
  rnd_select _ 0 = []
  rnd_select ys n = 
     let 
         (rnd_index, gen) = randomR (1, length ys) (mkStdGen 200)
         (x, xs) = removeAt rnd_index ys
     in x : rnd_select xs (n-1)
  </code></pre>
  
  <p>which works but I dont want use mkStdGen but use</p>
  
  <pre><code>  newStdGen or getStdGen
  </code></pre>
  
  <p>instead.
  I have seen the solutions to the problem but I want to understand how should I fix this code to do that and if its not possible why not because intuitively it feels like it should work but it doesn't. </p>