4 ms·
IMO the most accessible resource for learning functional concepts like Functors, Applicatives and Monads is the free online book: https://github.com/MostlyAdequ
by mpfundstein 10y ago
IMO the most accessible resource for learning functional concepts like Functors, Applicatives and Monads is the free online book: https://github.com/MostlyAdequate/mostly-adequate-guide https://github.com/MostlyAdequate/mostly-adequate-guide
It uses Javascript to explain everything from scratch. Pure-functions, currying, composition, functors, monads, applicatives and so on.
Its free, so check it out. Reading it and understanding the concepts completely changed my whole coding style in the last couple of month. I hope functional javascript becomes more mainstream and we will soon call this stuff 'standard'.
Its just too convenient to stack a Future on top of a Reader and get dependency injection + async function handeling without any boilerplate code.
P.S. Since ES6, javascript is wonderful. Functional code often really looks like lisp. Pity that we don't have macros (yet, and actually there is a way (sweet.js).
P.P.S. If DrBoolean got you hooked. You might want to check Ramda and fantasy-land. The former is a more functional minded underscore/lodash, the latter a specification (and community) for algebraic data structures in javascript to which a lot of new libraries adhere to.
- shadowfacts 10y agoSo far the Mostly Adequate Guide is awesome, it's really well written, easy to understand (so far), and fun to read.
- lolive 10y agoYour comment made me read this book. This book changed my life. A biiiillion thanks !!!!