Puedes leer la versión en español aquí.
Learning about functional programming is not an easy task, specially if you search for articles that have concrete examples of the concepts they try to teach. I have been learning about this paradigm for a while and I want it to share the notes I have taken, the ones I've turn into articles, and also the source material where I got the information.
Even though all these articles are related I didn't plan on writing them. So, I'll be presenting some sort of guide (a suggestion) on the order they should be read.
Some of these articles are available in the form of an observablehq notebook, where you can play around with the source code of every snippet. If there is an asterisk it will take you there. You can also find them here.
To complement that video I wrote my own notes.
If you read everything so far you already have enough knowledge to add some functional style to your everyday coding. You don't have to know every trick in the book to start seeing the benefits of this paradigm.
So, I want you to pay close attention to something called partial application, just like the concept of a pure function, partial application can help you a lot even if you decide you don't want to write code in a functional style.
This are my notes on the topic (with practical examples):
If you are convinced that this is useful then watch this video, in here you can see the kind of thing you can accomplish.
Now, knowing the basics is one thing, it's a whole other deal knowing how to use them in the most effective way. You already have the tools but you might be wondering how all of this fits together, that is our next step.
In this article we are going to learn how to use everything we have learned.
Just in case you missed it. In this talk (the source of the previous article) you can see in more detail what composition is about.
By now you must know how to manipulate functions and make them do your bidding. But I bet there are still things you want to know in more detail, two in particular: Functors and Monads. So, I'll try my best to tell you how you can use them to your advantage.
- Reduce: how and when (*)
- The case for reducers
- Lenses: an alternative to getters and setters
- Exploring Fantasy Land (*)
If you're still wondering what you can do just by composing functions just watch this.
If you got here and read everything then you know as much as I do. Got nothing else to show you. Whether you decided to adopt a fully functional style or not I hope you learned something that you can apply in your everyday coding.