code: function reduce (f, seed, arr) {
      var result = seed, i, n;
      for (i = 0, n = arr.length; i < n; i++) {
        result = f(result, arr[i]);
      }
      return result;
    }
docs: Array.prototype.reduce has similar performance to Array.prototype.map, so we define a custom reduce function to increase performance