loading...

re: Basic Functional Programming Patterns in JavaScript VIEW POST

FULL DISCUSSION
 

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.

 

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.

 

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

code of conduct - report abuse