I am learning Haskell and I have a problem where if given a list of a list of a list of Strings I have to find the total number of Strings in the entire initial list. My though process was to convert the entire initial list into a one dimensional list and get the length, however I can seem to figure it out.
What I have so far:
type Word = String
type Line = [Word]
type Page = [Line]
type Doc = [Page]
numWords :: Doc -> Line -> Word -> Int
I need to find the number of Words and I'm not sure if this is even the best way to go about this type of problem, but I am at a loss for ideas.
Any help would be much appreciated. Thank you.