3 ms·
I'd prefer to use the Maybe monad as an example of not being able to extract a value, as it's far clearer that sometimes there is no such value. >Secondly the
by aninhumer 11y ago
I'd prefer to use the Maybe monad as an example of not being able to extract a value, as it's far clearer that sometimes there is no such value.
>Secondly the article says it needs a way to map a function over it. This is a functor not a monad.
Yes, but since monad is a superclass of functor, it's still a necessary property. Certainly, I'd much prefer it be taught in that order, but this is definitely a property you need to understand in order to form intuitions about monads.