DEV Community

Discussion on: Basic Functional Programming Patterns in JavaScript

Collapse
 
sinewalker profile image
Mike Lockhart

I learnt a lot from this article. I feel I can finally wrap my head around map, filter, and reduce and map each one to an imperative loop pattern!

I also learnt a lot about JavaScript. The const arrow functions threw me for a loop until it sunk in: functions are first class in JavaScript! That's so easy to say without realising the implication, thanks for illustrating this.

Lastly, the shallow copy spread ... syntax is new to me, something to read about.

JavaScript has a lot of quirks, but it's also really kinda cool.

Collapse
 
nestedsoftware profile image
Nested Software • Edited

It's really gratifying to get a comment like this, thank you! Like a lot of things, the spread and rest syntax can be abused, but I do rather like it for these kinds of situations.

Collapse
 
sinewalker profile image
Mike Lockhart

Oh! Rest Params! Like in lisps, but also applicable to sequences. That's so neat. The syntax is nicer than I've seen in elisp, scheme, and clojure too. I'm intrigued