Mercurial > repo
changeset 1440:0c2527f959be
<GreyKnight> echo \'class Monad m where ; (>>=) :: forall a b. m a -> (a -> m b) -> m b ; (>>) :: forall a b. m a -> m b -> m b ; return :: a -> m a ; fail :: String -> m a\' >> wisdom/monad_tutorials
author | HackBot |
---|---|
date | Sat, 12 Jan 2013 01:01:55 +0000 |
parents | 08370a1a0555 |
children | b2da99b2e4e0 |
files | wisdom/monad_tutorials |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/wisdom/monad_tutorials Sat Jan 12 00:56:55 2013 +0000 +++ b/wisdom/monad_tutorials Sat Jan 12 01:01:55 2013 +0000 @@ -5,3 +5,4 @@ Monads are just monoids in the category of endofunctors. Monads are like when you and a friend are trying to have a conversation about a mutual friend. Monads are like overloading the semicolon. +class Monad m where ; (>>=) :: forall a b. m a -> (a -> m b) -> m b ; (>>) :: forall a b. m a -> m b -> m b ; return :: a -> m a ; fail :: String -> m a