title: How to compute the average for every n number in a list
body: <p>Having a List of numbers, I want to take every n(e.g. 5 , 10 , etc.) element, compute their average and put the average in a new list. As an example lets assume we have the following list:
  1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 
  Now we compute the average every 2 elements and we will get the following list as output: 
  1.5 , 3.5 , 5.5 , 7.5 
  How can I do that?  </p>