I'm trying to read in a text file using Haskell, but based on my limited and little knowledge of the language, I'm have a bit of trouble an would like some help.
I have a text file with 1000+ random words, and would like to read in the text file I know that I have to
import System.IO
and maybe
import Data.List
and I have something like this:
main = do
let list = []
handle <- openFile "words.txt" ReadMode
contents <- hGetContents handle
but I don't know much more to proceed. Any help would be great. I've been stuck for a while now and have a deadline coming soon. Thank you!