August 12th, 2006

  • evan

applications of monads

Neal pointed out that he read a paper that was more useful than my previous explanatory post. I think anyone sufficiently interested would benefit more from reading something written by an expert, so I'm just gonna mostly skip out on continuing that post.

Instead, you get one paragraph: what I was building to is that you can abstract the idea of this sequencing operator (which I called "=>") to applications other than lining up IO operations in order. And a monad, more or less, is a well-defined sequencing operation. Haskell has special syntax to make monads more pleasant, and since it's such a general concept the syntax is reusable in many different places. (Below I switch to Haskell syntax. Instead of writing "foo => {|x| ... }", they use "x <- foo; ...", which (intentionally) feels a lot like an assignment statement.)

Collapse )