Skip to content

Instantly share code, notes, and snippets.

View madmax911's full-sized avatar

Max Calcagno - Professional and hobbyist programmer madmax911

View GitHub Profile
@madmax911
madmax911 / Currying_unit_tests_casidoo.js
Last active September 6, 2022 18:02
An example of unit tests for a currying function. One of the Casidoo challenges.
// Currying (cool stuff)
function addg(a) {
if (a === undefined) return a;
return function g(b) {
if (b !== undefined) {
return addg(a+b);
}
return a;
};