Use the Helpful Links?

Use the Helpful Links?


Can we assume that the “Helpful Links” section of the challenges suggest that the functions and principles referenced should be used or are recommended in solving the challenges? As a programmer with many years of experience I am able to solve the challenges, however, I have the distinct impression I’m missing something by solving the problem using approaches not implied by the “Helpful Links” references. For example, many problems that might be solvable using simple for loops might be more cleanly (or at least more idiomatically) solved using a reduce or map function. I’m actually contemplating solving each problem twice; once just to pass the challenge and once to try to figure out how the “Helpful Links” references might be used to solve the problem.


I was reading up on higher order functions like map and reduce in Eloquent JavaScript last night. Map and reduce are basically abstractions that use for loops to process an array in some way. According to the book, that abstraction and ‘cleanliness’ of code comes at the cost of efficiency, but depending on the circumstances it’s a trade that can be sensible to make.

I didn’t really understand map/reduce/apply etc when I did the algos originally - I just hacked together any old thing that passed…I’ll go back and redo them when I fancy a break from the back-end stuff I’m doing at the moment.