title: What does the growingElements function in QuickCheck do?
body: <p>I was poking around the documentation of QuickCheck when I stumbled into the <a href="https://hackage.haskell.org/package/QuickCheck-2.9.1/docs/Test-QuickCheck-Gen.html#v:growingElements" rel="nofollow">growingElements</a> function. The documentation there says</p>
  
  <blockquote>
    <p>Takes a list of elements of increasing size, and chooses among an
    initial segment of the list. The size of this initial segment
    increases with the size parameter. The input list must be non-empty.</p>
  </blockquote>
  
  <p>What exactly does this mean? When I tried this function in ghci, 
  it just returns random values in the a given array when I run <code>generate</code> on it again and again. I don't see the difference between randomly choosing from the list and what this function is doing. </p>
  
  <pre><code>*Main Test.QuickCheck&gt; generate $ growingElements [1..100]
  13
  *Main Test.QuickCheck&gt; generate $ growingElements [1..100]
  53
  *Main Test.QuickCheck&gt; 
  *Main Test.QuickCheck&gt; generate $ growingElements [1..100]
  65
  *Main Test.QuickCheck&gt; generate $ growingElements [1..100]
  49
  *Main Test.QuickCheck&gt; 
  </code></pre>
  
  <p>Could someone explain more clearly what this function actually does?</p>