title: Is operator && strict in Haskell?
body: <p>For example, I have an operation <code>fnB :: a -&gt; Bool</code> that makes no sense until <code>fnA :: Bool</code> returns <code>False</code>. In C I may compose these two operations in one <code>if</code> block:</p>
  
  <pre><code>if( fnA &amp;&amp; fnB(a) ){ doSomething; }
  </code></pre>
  
  <p>and C will guarantee that <code>fnB</code> will not execute until <code>fnA</code> returns false.</p>
  
  <p>But Haskell is lazy, and, generally, there is no guarantee what operation will execute first, until we don't use <code>seq</code>, <code>$!</code>, or something else to make our code strict. Generally, this is what we need to be happy. But using <code>&amp;&amp;</code> operator, I would expect that <code>fnB</code> will not be evaluated until <code>fnA</code> returns its result. Does Haskell provide such a guarantee with <code>&amp;&amp;</code>? And will Haskell evaluate <code>fnB</code> even when <code>fnA</code> returns False?</p>