CLTPayne / reduce

Functional programming challenge to implement reduce() and subsequent array methods without loops or mutation
0 stars 0 forks source link

Reduce

A Functional Programming paradigm challenge.

Challenge 1:

Implement your own version of reduce. You're not allowed to mutate any variables and you can't use a for loop. It has to be done with functions. Don't rely on objects or instance variables. Only functions and conditionals.

Attempts

reduce1.js

reduce2.js

reduce3.js

reduce4.js

reduce5,js

Clues:

Test data suggestion: reducePayne([1, 2, 3, 4, 5], function(a, b) { return a + b; }) Your job is to implement reducePayne. You should get a result of 15 for the above call.

Challenge 2:

Listed in the issues here.

map1.js

map2.js

Challenge 3:

Listed in the issues here.

filter1.js

filter2.js

Challenge 4:

Listed in the issues here.

groupBy1.js