Haskell file reading
Not a bad start! The only thing to remember is that pure function application should use let instead of the binding <-. import System.IO import Control.Monad main = do let list = [] handle <- openFile “test.txt” ReadMode contents <- hGetContents handle let singlewords = words contents list = f singlewords print list hClose handle … Read more