title: Writing an accumulator function in Clojure
body: <p>I'd like to know how to write the accumulator example included in the <a href="http://www.paulgraham.com/icad.html">Revenge of the Nerds</a> essay.
  It's easy to understand how it works, however I fail to recreate it in Clojure - it doesn't <em>accumulate</em> but just returns the sum of i and the initial given value of n.</p>
  
  <p>The key is in <strong>incf</strong> (in the Common Lisp version) or <strong>+=</strong> (in JavaScript).</p>
  
  <p>In other words: how to alter the state of a referenced function? I've seen some examples on mutating variables but they don't look <a href="http://en.wikibooks.org/wiki/Clojure_Programming/Examples/Cookbook#Modifying_State">precisely  pretty</a> do they?</p>