[Haskell-beginners] monads / do syntax
Ozgur Akgun
ozgurakgun at gmail.com
Tue Sep 4 14:10:18 CEST 2012
Hi,
On 4 September 2012 13:03, Christopher Howard <
christopher.howard at frigidcode.com> wrote:
> h = do a <- (return 1 :: IO Integer)
> b <- (return 2)
> return (a + b + 1)
>
h =
(return 1 :: IO Integer) >>= \ a ->
(return 2) >>= \ b ->
return (a + b + 1)
HTH,
Ozgur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120904/faefb460/attachment.htm>
More information about the Beginners
mailing list