
On 2008 Oct 14, at 23:55, Magicloud wrote:
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.
If you are on FreeNode IRC, you can ask lambdabot to @undo such expressions (would need to use braces and semicolons instead of layout though). main = getArgs >>= \a -> getLine >>= \b -> myFunc1 (head a) b >> myFunc2 b (head a) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH