How would I accomplish the same thing in a functional paradigm?
Player.prototype.d2 = function(ratingList, rdList) {
var tempSum = 0;
for (var i = 0; i < ratingList.length; i++) {
var tempE = this.e(ratingList[i], rdList[i]);
tempSum += Math.pow(this.g(rdList[i]), 2) * tempE * (1 - tempE);
}
return 1 / Math.pow(q, 2) * tempSum;
};