3 ms·
Lodash is what finally made me get functional programming, because I was able to start using it in small places where it made sense as opposed to diving into it
by pmlamotte 12y ago
Lodash is what finally made me get functional programming, because I was able to start using it in small places where it made sense as opposed to diving into it all at once. At first it started out with just map and filter for some basic cases. Then I would peruse the Lodash docs now and then and discover functions that could replace a lot of my iterative, often messy code with something that felt much more elegant, especially with chaining.
With that new-found knowledge, I decided to make my 4th or 5th attempt at trying to grasp clojure and ran through some 4clojure problems. This time I breezed through the problems, and in many cases enjoyed writing it more than I would have in a typical iterative style. I made sure to follow some recommended users to see their solutions as well, which helped reduce much of my parentheses bloat.
My favorite thing about using high order functions has been that provided your underlying functions are tested/correct, you can more easily reason about and test your new functions, particularly when you keep things immutable/side-effect free.
I'm sure I would have gotten to this point eventually without Lodash, but being able to make use of bits and pieces at a time was a major catalyst for me.