|
|
|
|
|
by Nadya
3212 days ago
|
|
"Once you understand monads, you immediately become incapable of explaining them to anyone else” Lady Monadgreen’s curse ~ Gilad Bracha" If you'd like to go down a rabbit hole of category theory look up the phrase "A monad is just a monoid in the category of endofunctors, what's the problem?" - a fun quote that a lot of monad explanatory tutorials will quip. Not that it will help - because anyone writing a monad explanation already suffers from the first quote: they're incapable of explaining them. I had read 30 or 35 different monads-for-Javascript tutorials/guides/explanations before I finally thought I grokked it. None of them have helped and I'm still not sure my understanding of them is correct. |
|
map is understood in javascript.
So you 'just' need to make the leap to flatmap. Which is mapping something and flattening the result.
So still you need to learn is what flatten is. But that's not too hard to learn.
Try the funfunfunction video [0]
[0]: https://m.youtube.com/watch?v=9QveBbn7t_c