3 ms·
Indeed! The concept of Monad is simple and very useful; once you learn it, you start seeing it everywhere. JS Promises are not completely monadic though, becau
by nine_k 4y ago
Indeed! The concept of Monad is simple and very useful; once you learn it, you start seeing it everywhere.
JS Promises are not completely monadic though, because a Promise that resolves into a Promise is always effectively auto-flattened into a single Promise. But most of the time other monadic properties of Promises can be used despite this.
- xupybd 4y agoGood to know. I didn't realize that promises were not monads.