This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns rubric.core) | |
(defn average | |
"Averages a set of scores" | |
[& scores] | |
(/ (apply + scores) (count scores))) | |
(defn weighted-average | |
"Calculates a total score from individual weighted results. | |
Expects pairs of <weight>, <score> whose weights add to 1.0." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fib, num; | |
fib = function(x) { | |
if (x > 2) { | |
return fib(x - 1) + fib(x - 2); | |
} | |
return x; | |
}; | |
console.log((function() { | |
var _results; | |
_results = []; |