title: How can I use ScalaCheck generators inside for comprehensions?
body: <p>ScalaCheck generators work with the syntactic sugar in Scala's for expressions:</p>
  
  <pre><code>for( s1 &lt;- Gen.choose(1, 10); s2 &lt;- Gen.choose(10, 100) ) yield ( s1, s2 )
  </code></pre>
  
  <p>I'd like to be able to mix "traditional" Scala for expressions with ScalaCheck expressions. For example:</p>
  
  <pre><code>for( s0 &lt;- 0 until 10; s1 &lt;- Gen.choose(1, 10); s2 &lt;- Gen.choose(10, 100) ) yield ( s0, s1, s2 )
  </code></pre>
  
  <p>However, this won't compile, since the <code>0 until 10</code> expressions isn't a type of <code>Gen</code>.</p>
  
  <p>How can I achieve this (and <code>Seq</code> and/or <code>Traversable</code> expressions in general) within the same <code>for</code> loop?</p>
  
  <p>EDIT: The consensus in the answers seems to be that the kind of syntactic sugar I'm looking for is not possible.</p>
  
  <p>However, could this not be done with some form of stateful Gen? In particular, one which used the state monad?</p>