How to add n consecutive element in list
<p>My last question was <a href="http://stackoverflow.com/questions/9161525/adding-two-consecutive-numbers-in-a-list">adding two consecutive numbers in a list</a> . But answers are not generalized. How to add <code>n</code> <code>consecutive elements</code> in
a list. where <code>n &gt;= 2</code></p>

<pre><code>if n = 3

l = [1,2,3,4,5,6] result = [6, 15]
l = [1,2,3,4,5,6,7] result = [6, 15, 7]
l = [1,2,3,4,5,6,7,8] result = [6, 15, 15]

if n = 4

l = [1,2,3,4,5,6,7] result = [10, 18]
</code></pre>
