title: How does foldr work?
body: <p>Can anybody explain how does <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:foldr" rel="noreferrer"><code>foldr</code></a> work?</p>
  
  <p>Take these examples:</p>
  
  <pre><code>Prelude&gt; foldr (-) 54 [10, 11]
  53
  Prelude&gt; foldr (\x y -&gt; (x+y)/2) 54 [12, 4, 10, 6]
  12.0
  </code></pre>
  
  <p>I am confused about these executions. Any suggestions?</p>