title: mixing foldr with OR in Haskell (laziness?)
body: <p>How can this function return true?</p>
  
  <pre><code>foldr (||) False [True,undefined] 
  
  =&gt; True
  </code></pre>
  
  <p>The first fold looks like this:</p>
  
  <pre><code>undefined || True 
  </code></pre>
  
  <p>, which should return an error</p>
  
  <p>So im guessing haskell gives priority to the lazyness of the OR function over doing the folds step by step. Finds a <code>True</code> on the way and returns that before starting the fold</p>
  
  <p>Is this correct? In that case, does haskell always give priority to a lazy function over the non lazy ones? I believe that is the definition for being lazy but it seems like that can change the answer to make it wrong</p>