function sum(obj, map) {
    var sum = 0;
    enumerateWithMapping(obj, map, function(val) {
      sum += val;
    });
    return sum;
  }
@module Enumerable
@description Counting, mapping, and finding methods on both arrays and objects.

*