title: Twig sum row above the summerisation
body: <p>I'm kinda new to twig and I know it is possible to add up values in a template and collect them in a variable. But what i actually need is to show the summerised value in the template before I sum up them. I need something like slots in the old symfony. Or in php I could do this by ob_start(). It is possible in twig somehow?</p>
  
  <p>I whould like it something like this.</p>
  
  <pre><code>sum is: {{ sum }} {# obviously it is 0 right here, but i want the value from the calculation #}
  
  {# some content.. #} 
  
  {% set sum = 0 %}
  
  {% for r in a.numbers}
  
     {% set sum = sum + r.number %}
  
  {% endfor %}
  </code></pre>