27.12.2013 Views

Wearing the hair shirt Wearing the hair shirt - Microsoft Research

Wearing the hair shirt Wearing the hair shirt - Microsoft Research

Wearing the hair shirt Wearing the hair shirt - Microsoft Research

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Monads generally<br />

A monad consists of:<br />

A type constructor M<br />

bind :: M a -> (a -> M b) -> M b<br />

unit :: a -> M a<br />

PLUS some per-monad operations (e.g.<br />

getChar :: IO Char)<br />

There are lots of useful<br />

monads, not only I/O

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!