title: How does fold works for empty list?
body: <p>When we fold a list with one or more elements inside as done below:</p>
  
  <pre><code>foldr (+) 0 [1,2,3]
  </code></pre>
  
  <blockquote>
    <p>We get:  </p>
    
    <p>foldr (+) 0 (1 : 2 : 3 : [])</p>
    
    <p>foldr (+)   1 + (2 +(3 + 0)) // 6</p>
  </blockquote>
  
  <p>Now when the list is empty:</p>
  
  <pre><code> foldr (+) 0 []
  </code></pre>
  
  <blockquote>
    <p>Result: foldr (+) 0 ([])</p>
  </blockquote>
  
  <p>Since (+) is binary operator, it needs two arguments to complete but here we end up <code>(+) 0</code>. How does it result in 0 and not throwing error of partially applied function.</p>