A morning challenge for https://github.com/foundersandcoders
Functional programming provides developers with the tools to abstract common collection operations into reusable, composable building blocks. Most of the operations you perform on collections can be accomplished with five simple functions:
- map
- filter
- concatAll
- reduce
- zip
In this challenge we will only cover map, filter and reduce.
For more practice I recommend to check out the original source of this repo: http://reactivex.io/learnrx/
The Array is Javascript's only collection type. Map, filter, and reduce already exist in Javascript as array methods, however you are going to reimplement these functions as a learning exercise.
git clone https://github.com/katkelemen/FuncProgMorninChallenge.git
npm install
- to run the tests:
npm run test
- make the failing tests pass one by one
- have fun:)
Questions:
- Why do we use "deepEqual" in the tests?
- What is "throw" at Exercise.js?