title: What is the 'pythonic' equivalent to the 'fold' function from functional programming?
body: <p>What is the most idiomatic way to achieve something like the following, in Haskell:</p>
  
  <pre><code>foldl (+) 0 [1,2,3,4,5]
  --&gt; 15
  </code></pre>
  
  <p>Or its equivalent in Ruby:</p>
  
  <pre><code>[1,2,3,4,5].inject(0) {|m,x| m + x}
  #&gt; 15
  </code></pre>
  
  <p>Obviously, Python provides the <code>reduce</code> function, which is an implementation of fold, exactly as above, however, I was told that the 'pythonic' way of programming was to avoid <code>lambda</code> terms and higher-order functions, preferring list-comprehensions where possible. Therefore, is there a preferred way of folding a list, or list-like structure in Python that isn't the <code>reduce</code> function, or is <code>reduce</code> the idiomatic way of achieving this?</p>