printable version

Test 2 Review B

[1] [2] [3] [4] [5] [6] [7] [8] [9]

Problem R2b.1.

Convert the following Haskell expression using do notation to the equivalent non-do form using the Monad operator >>=.

do args <- getArgs
   fstr <- readFile (head args)
   putStrLn (show (length fstr))