title: Accumulator in foldr
body: <p>In the Haskell Wikibook, foldr is implemented as follows:</p>
  
  <pre><code>foldr :: (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b
  foldr f acc []     = acc
  foldr f acc (x:xs) = f x (foldr f acc xs)
  </code></pre>
  
  <p>It is stated that the initial value of the accumulator is set as an argument. But as I understand it, acc is the identity value for the operation (e.g. 0 for sum or 1 for product) and its value does not change during the execution of the function. Why then is it referred to here and in other texts as an accumulator, implying that it changes or accumulates a value step by step?</p>
  
  <p>I can see that an accumulator is relevant in a left fold, such as foldl, but is the wikibook explanation incorrect, and only for symmetry, in which case it is wrong?</p>