Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em>(See also the answers at <strong><a href="https://stackoverflow.com/questions/44965/what-is-a-monad">What is a monad?</a></strong>)</em></p> <p>A good motivation to Monads is sigfpe (Dan Piponi)'s <a href="http://sigfpe.blogspot.com/2006/08/you-could-have-invented-monads-and.html" rel="nofollow noreferrer">You Could Have Invented Monads! (And Maybe You Already Have)</a>. There are <a href="http://www.haskell.org/haskellwiki/Monad_tutorials_timeline" rel="nofollow noreferrer">a LOT of other monad tutorials</a>, many of which misguidedly try to explain monads in "simple terms" using various analogies: this is the <a href="http://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/" rel="nofollow noreferrer">monad tutorial fallacy</a>; avoid them.</p> <p>As DR MacIver says in <em><a href="http://www.drmaciver.com/2008/02/tell-us-why-your-language-sucks/" rel="nofollow noreferrer">Tell us why your language sucks</a></em>: <blockquote> <P> <strong>So, things I hate about Haskell:</strong> </p> <p> Let’s start with the obvious. Monad tutorials. No, not monads. Specifically the tutorials. They’re endless, overblown and dear god are they tedious. Further, I’ve never seen any convincing evidence that they actually help. Read the class definition, write some code, get over the scary name. </p></blockquote></p> <p>You say you understand the Maybe monad? Good, you're on your way. Just start using other monads and sooner or later you'll understand what monads are in general.</p> <p>[If you are mathematically oriented, you might want to ignore the dozens of tutorials and learn the definition, or follow <a href="http://lambda-the-ultimate.org/node/2455" rel="nofollow noreferrer">lectures in category theory</a> :) The main part of the definition is that a Monad M involves a "type constructor" that defines for each existing type "T" a new type "M T", and some ways for going back and forth between "regular" types and "M" types.]</p> <p>Also, surprisingly enough, one of the best introductions to monads is actually one of the early academic papers introducing monads, Philip Wadler's <a href="http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf" rel="nofollow noreferrer">Monads for functional programming</a>. It actually has practical, <em>non-trivial</em> motivating examples, unlike many of the artificial tutorials out there.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload