Proposal: Applicative => Monad: Call for consensus

roconnor at theorem.ca roconnor at theorem.ca
Thu Jan 6 21:25:47 CET 2011


On Thu, 6 Jan 2011, Maciej Piechotka wrote:

> Maybe better example:
>
> doA :: String -> String -> String -> IO String
> doB :: IO String
>
> doC = join $ doA <$> doB <*> doB <*> doB
>
> vs.
>
> doC = do
>  x <- doB
>  y <- doB
>  z <- doB
>  doA x y z

This is a good illustration.  Notice how the intermediate variables don't 
have to be named.

-- 
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''



More information about the Libraries mailing list