xxxxxxxxxx
//The easiest-to-understand definition of Aggregate
//is that it performs an operation on each element
//of the list taking into account the operations
//that have gone before. That is to say it performs
//the action on the first and second element and
//carries the result forward. Then it operates on
//the previous result and the third element and
//carries forward. etc.
var nums = new[]{1,2,3,4};
var sum = nums.Aggregate( (a,b) => a + b);
Console.WriteLine(sum); // output: 10 (1+2+3+4)