title: Increasing integer during a loop
body: <p>I'm trying to increase a variable only during certain conditions </p>
  
  <pre><code>Enum.reduce(items, 0, fn item, acc  -&gt;
    if item.condition do
      acc = acc+1
      Logger.info acc
    end
  end)
  </code></pre>
  
  <p>But i get</p>
  
  <pre><code>** (ArithmeticError) bad argument in arithmetic expression
  </code></pre>