[Haskell-cafe] About do notation.

Tony Morris tmorris at tmorris.net
Tue Oct 14 23:59:06 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Magicloud wrote:
> Hi, As some articles say, do notation is expand to (>>) and (>>=)
> when being compiled. So I want to know the details. Like: main = do
>  a <- getArgs b <- getLine myFunc1 (head a) b myFunc2 b (head a)
>
> I cannot figure out what is the (>>) and (>>=) way of this.
>
> Thanks. _______________________________________________
> Haskell-Cafe mailing list Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
>
getArgs >>= (\a -> getLine >>= (\b -> myFunc1 (head a) b >> myFunc2 b
(head a)))

- --
Tony Morris
http://tmorris.net/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI9WqJmnpgrYe6r60RAhAEAKCNvJaxziyZ3g9wGUOoJpcx4/MrtwCfVnlL
ZflntZ5xrDOCv3kHgcuMP18=
=21PH
-----END PGP SIGNATURE-----



More information about the Haskell-Cafe mailing list