It is hard to understand monads if you don't talk about applicatives. Monads are neither there to handle computaional effects nor side effects. Types like Maybe/IO do this. Functors are useful, because you can reuse your pure functions for all these types that handle computations with effects. Applicatives/Monads are useful, because you can compose several effectful computations. While applicatives don't assume an order these computations are evaluated in, monads do assume one.
It is hard to understand monads if you don't talk about applicatives.
I did write something after I mentioned pointed functors, but then I deleted that section.
Monads are neither there to handle computaional effects nor side effects. Types like Maybe/IO do this.
You're right, that's not the purpose of a monad, but they can be used to handle that sort of things. I mean, the types you mention Maybe and IO are an example of that. I guess that's just me trying to tell other people that monads aren't useless in javascript.
Most people need several years to really understand all facettes of Monads 'n stuff. During this journey they evolve different abstract representations in their head, where each becomes more accurate than the previous one. So there is really nothing wrong with your attempt to teach people the concept. I just wanted to point out some inaccuracies, that's all.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It is hard to understand monads if you don't talk about applicatives. Monads are neither there to handle computaional effects nor side effects. Types like
Maybe
/IO
do this. Functors are useful, because you can reuse your pure functions for all these types that handle computations with effects. Applicatives/Monads are useful, because you can compose several effectful computations. While applicatives don't assume an order these computations are evaluated in, monads do assume one.I did write something after I mentioned pointed functors, but then I deleted that section.
You're right, that's not the purpose of a monad, but they can be used to handle that sort of things. I mean, the types you mention
Maybe
andIO
are an example of that. I guess that's just me trying to tell other people that monads aren't useless in javascript.Most people need several years to really understand all facettes of Monads 'n stuff. During this journey they evolve different abstract representations in their head, where each becomes more accurate than the previous one. So there is really nothing wrong with your attempt to teach people the concept. I just wanted to point out some inaccuracies, that's all.