title: How to stop a reduce function from processing the list once the desired accumulation has been reached?
body: <p>In the procedural world, if I have to find the first item of a list that meets a test, I would just use <code>break</code> or <code>return</code>.</p>
  
  <p>In Clojure, when I am processing a list using <code>reduce</code> to find that first value, won't it be inefficient if I continue and process the entire list?</p>
  
  <p>For example: validating a list of dictionaries for errors; each dictionary has a key called <code>count</code>.  Now the total sum of these count fields in the list should not exceed a certain value.  How do I find the first item in the list where the sum exceeds the limit ?</p>
  
  <p>Ideally, I would use <code>reduce</code> and maintain a running total; as soon as the total exceeds the limit, I would like to stop there (which I can't figure out how to do).</p>
  
  <p>Also, the return value of the reduce will be the sum till now everytime but I would need to return the index at the end of all. </p>