[Haskell-cafe] Re: Can we come out of a monad?
ok at cs.otago.ac.nz
Sun Aug 8 19:28:09 EDT 2010
On Aug 3, 2010, at 11:37 PM, Christopher Witte wrote:
> On 3 August 2010 01:34, Richard O'Keefe <ok at cs.otago.ac.nz> wrote:
> There's a thing I'm still finding extremely hard about monads,
> and that's how to get into the frame of mind where inventing
> things like Monad and Applicative and Arrows is something I could
> do myself. Functor, yes, I could have invented Functor.
> But not the others.
> Maybe looking at Sigfpe's blog post You Could Have Invented Monads! (And Maybe You Already Have.) will help.
Notice the tense, "could have". I have read You Could Have Invented
Monads, and recommended it to students. In fact I _did_ invent
monads, in the guise of parser combinators. That is to say, having
heard of parser combinators, I developed my own set, which contained
operations recognisable with hindsight as the operations of Monad and
MonadPlus &c BUT I DID NOT REALISE THAT THAT WAS WHAT I HAD DONE.
After reading that blog post, yes.
More information about the Haskell-Cafe