diff --git a/coursework/part2/src/Lib.hs b/coursework/part2/src/Lib.hs index d0be732..9399da5 100644 --- a/coursework/part2/src/Lib.hs +++ b/coursework/part2/src/Lib.hs @@ -4,7 +4,7 @@ import Data.Char (isLetter, toLower) splitText :: String -> [[String]] -splitText text = map (processSentence . words) (splitSentences text) +splitText text = filter (not . null) $ map (processSentence . words) (splitSentences text) where splitSentences :: String -> [String] splitSentences [] = []