
7 Jun
2011
7 Jun
'11
8:30 a.m.
In a reply to an earlier question, someone told me that "do" expressions are simply syntactic sugar that expand to expressions with the >> and
= operators. I was trying to understand this (and the Monad class) better.
I see in my own experiments that this... main = do ln1 <- getLine putStrLn ln1 translates to this: main = getLine >>= \ln1 -> putStrLn ln1 However, what does this translate to?: main = do ln1 <- getLine ln2 <- getLine putStrLn (ln1 ++ ln2) -- frigidcode.com theologia.indicium.us