3 ms·
If you're familiar with JavaScript, then some of its advanced features can "ease" you into functional programming: 1. Closures. Closures are handy for lots of
by thaumaturgy 16y ago
If you're familiar with JavaScript, then some of its advanced features can "ease" you into functional programming:
1. Closures. Closures are handy for lots of things, but a lot of people (myself included) have said that they had difficulty understanding them at first. I don't know what your knowledge level is so I won't presume that you need a tutorial, but if you do, a lot of people here should be able to help.
2. Anonymous functions. You can create functions on-the-fly, you don't have to name them, then store them in a variable and call the variable.
I don't really "know" any functional programming languages, but these things are apparently common concepts in that arena, and playing around with them in a language that you're familiar with might make it easier for you.
I'd be willing to go into more detail if you'd like, or provide examples. I have tens of thousands of lines of JavaScript, and a lot of it takes advantage of JS' functional programming stuff.
- digamber_kamat 16y agoI love both Closures as well ans Anonymous functions.