src/js/base/core/lists.js
function sum(array, fn) {
  fn = fn || func.self;
  return array.reduce(function(memo, v) {
    return memo + fn(v);
  }, 0);
}
function sum(array, fn) {
  fn = fn || func.self;
  return array.reduce(function(memo, v) {
    return memo + fn(v);
  }, 0);
}
function sum ( array , fn ) { fn = fn || func . self ; return array . reduce ( function ( memo , v ) { return memo + fn ( v ) ; } , 0 ) ; }
get sum from a list

@param {Array} array - array
@param {Function} fn - iterator
get sum from a list