title: Ending a for-comprehension loop when a check on one of the items returns false
body: <p>I am a bit new to Scala, so apologies if this is something a bit trivial.</p>
  
  <p>I have a list of items which I want to iterate through. I to execute a check on each of the items and if just one of them fails I want the whole function to return false. So you can see this as an AND condition. I want it to be evaluated lazily, i.e. the moment I encounter the first false return false. </p>
  
  <p>I am used to the <code>for - yield</code> syntax which filters items generated through some generator (list of items, sequence etc.). In my case however I just want to break out and return false without executing the rest of the loop. In normal Java one would just do a <code>return false;</code> within the loop. </p>
  
  <p>In an inefficient way (i.e. not stopping when I encounter the first false item), I could do it:</p>
  
  <pre><code>   (for {
            item &lt;- items
            if !satisfiesCondition(item)
          } yield item).isEmpty
  </code></pre>
  
  <p>Which is essentially saying that if no items make it through the filter all of them satisfy the condition. But this seems a bit convoluted and inefficient (consider you have 1 million items and the first one already did not satisfy the condition).</p>
  
  <p>What is the best and most elegant way to do this in Scala?</p>