Interesting. Does that mean the lines following a "x <- getLine" are
simply balled up into a function? What if there are multiple lines?
I'll insert the translation:
main = do main =
fn <- getLine getLine >>= \fn ->
ln <- getLine getLine >>= \ln ->
putStr $ reverse ln putStr (reverse ln) >>
putStr " " putStr " " >>
putStr $ reverse fn putStr (reverse fn)
Which is just a single large expression. "do" syntax is not magic, nor is it some fundamentally different language. It's just a convenient way to write a certain repetitious pattern.
--