2 ms·
This has one of the usual dangers of trying to do a visualization of a monad, which is that it strongly implies that there is a one-to-one relationship between
by jerf 14y ago
This has one of the usual dangers of trying to do a visualization of a monad, which is that it strongly implies that there is a one-to-one relationship between what you put in and what comes out, which is basically saying that the bind function of the monadic interface implementation will only call the function it receives once. This is not true; it may be called zero times (Nothing, empty list), once (Just something, a list of one element), or many times (once for each element in the list for the list monad, for instance), which is a critical element to understanding the monad interface. So, you know, be aware of that I guess.
- tellarin 14y agoFrom my point of view the guy does a good job of showing the three cases. Would you have a specific suggestion to improve his presentation?
- egonschiele 14y ago/r/haskell has already discussed this at length: http://www.reddit.com/r/haskell/comments/1co0s5/functors_applicatives_and_monads_in_pictures/ http://www.reddit.com/r/haskell/comments/1co0s5/functors_app... And I've given Maybe's Monad instance definition as well as explained it in pictures. If there's something missing please let me know specifically.