You likely use it every day at work.
This makes it possible to practice and apply your acquired knowledge each day on real world programs rather than pet projects on nights and weekends in an esoteric FP language.
We don't have to learn everything up front to start writing programs.
In a pure functional language, you cannot log a variable or read a DOM node without using monads. Here we can cheat a little as we learn to purify our codebase. It's also easier to get started in this language since it's mixed paradigm and you can fall back on your current practices while there are gaps in your knowledge.
The language is fully capable of writing top notch functional code.
bindall over the place lest
thischange out from under us, we have various work arounds for the quirky behavior when the
newkeyword is forgotten, private members are only available via closures. To a lot of us, FP feels more natural anyways.
For a best reading experience, read it online via Gitbook.
To make the training efficient and not get too bored while I am telling you another story, make sure to play around with the concepts introduced in this book. Some can be tricky to catch at first and are better understood by getting your hands dirty. All functions and algebraic data-structures presented in the book are gathered in the appendixes. The corresponding code is also available as an npm module:
$ npm i @mostly-adequate/support
Alternatively, exercises of each chapter are runnable and can be completed in your editor! For example, complete the
exercises/ch04and then run:
$ npm run ch04
Find pre-generated PDF and EPUB as build artifacts of the latest Github Workflows.
⚠️ This project setup is now a bit old and thus, you may run into various issues when building this locally. We recommend to use node v10.22.1 and the latest version of Calibre if possible.
git clone https://github.com/MostlyAdequate/mostly-adequate-guide.git cd mostly-adequate-guide/ npm install npm run setup npm run generate-pdf npm run generate-epub
Note! To generate the ebook version you will need to installebook-convert. Installation instructions.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.