title: Haskell Folding commutative, associative functions on Foldables containing bottom type
body: <p>I recently tried running the code:</p>
  
  <pre><code>&gt; let _l_ = _l_
  &gt; any [True, _l_, False]
  True
  &gt; any [False, _l_, True]
  
  &gt; -- _l_
  </code></pre>
  
  <p>I was wondering if this is considered correct behavior since <code>any</code> is defined as <code>foldr (||) False</code> and <code>||</code> is associative and commutative.</p>
  
  <p>Shouldn't <code>_l_ || True == True || _l_</code> be true, and <code>(False || _l_) || True == False || (_l_ || True)</code> be true?</p>
  
  <p>How would I implement an <code>any</code> that would result in an associative, commutative function application?</p>
  
  <p>I am new to trying to understand bottom; should <code>||</code> be returning at all?</p>
  
  <p>Thanks</p>