by derefr · 12y ago · 0 comments
do stuff <- getLine
putStrLn stuff
but the stuff variable is then unnecessarily introduced. You could instead just write getLine >>= putStrLn
or the flipped version if you want it to read more like function application putStrLn =<< getLineYes I would. I would much rather see "getLine >>= putStrLn" than a 2 line do block.