*
@method average([map])
@returns Number
@short Averages all values in the array.
@extra [map] may be a function mapping the value to be averaged or a string acting as a shortcut.
@example

[1,2,3].average()                           -> 2
+   [{age:35},{age:11},{age:11}].average(function(n) {
return n.age;
});                                         -> 19
[{age:35},{age:11},{age:11}].average('age') -> 19

*
function(map) {
      var arr = map ? this.map(map) : this;
      return arr.length > 0 ? arr.sum() / arr.length : 0;
    }