About this book
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 don't have classes (yet), 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.
Read it Online
For a best reading experience, read it online via Gitbook.
- Quick-access side-bar
- In-browser exercises
- In-depth examples
Do it yourself
git clone https://github.com/MostlyAdequate/mostly-adequate-guide.git cd mostly-adequate-guide/ npm install npm run setup gitbook pdf
Table of Contents
Plans for the future
- Part 1 (chapters 1-7) is a guide to the basics. I'm updating as I find errors since this is the initial draft. Feel free to help!
- Part 2 (chapters 8-10) will address type classes like functors and monads all the way through to traversable. I hope to squeeze in transformers and a pure application.
- Part 3 (chapters 11+) will start to dance the fine line between practical programming and academic absurdity. We'll look at comonads, f-algebras, free monads, yoneda, and other categorical constructs.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.