4 ms·
Monads are mainly hard to grasp because Monad is a terrible name and all explanations overly convoluted
by cerved 6y ago
Monads are mainly hard to grasp because Monad is a terrible name and all explanations overly convoluted
- brundolf 6y agoI think there are monads that are reasonably intuitive - Promises, Option types, etc (I know promises are ~technically~ not monads). It's mainly the practice of incorporating state into a stateless language and all the weirdness that entails that's the problem, in my view (so, specifically the IO monad)
- andreareina 6y ago> (I know promises are ~technically~ not monads) Do you mean promises in general, or the concrete implementation in js? I've got it in my head that promises the pattern are monadic, but js stuffs it (e.g. by up by making .then() automatically flatten if the callback also returns a promise)