Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. 001
  2. 002
  3. 003
  4. 004
  5.  
  6. map (splitOn "n") (readFile "file.txt")
  7.  
  8. Couldn't match expected type `[[Char]]'
  9. with actual type `IO String'
  10. In the return type of a call of `readFile'
  11. In the second argument of `map', namely `(readFile "file.txt")'
  12. In the expression: map (splitOn "") (readFile "file.txt")
  13.  
  14. main = do
  15. fileContents <- readFile "file.txt"
  16. let modified = map (splitOn "n") fileContents
  17. putStrLn modified
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement