4 ms·
My favorite approach is from Functional Programming in Scala, which doesn't mention monads until chapter 11. But it has you implement a bunch of collections wit
by SatvikBeri 2y ago
My favorite approach is from Functional Programming in Scala, which doesn't mention monads until chapter 11. But it has you implement a bunch of collections with `map`, `map2`, `unit`, and `flatMap`, and exercises that repeatedly show how useful this interface is. So by the time you get to it, the definition of Monad feels obvious, as well as Functors & Applicatives.
- jimbokun 2y agoI like that, because I feel like every time I read about Monads, the question “why is this a useful abstraction?” is rarely addressed.