I want a fuction where you put in a String like "Hello I am 25 years old!" and get a list out of it like ["hello","i","am","years","old"]. So it should put all uppercase letters in lowercase and delete everything that isnt a letter. It should just use Data.List and Data.Char. I know i should use words on the String and then filter it but i just cant figure it out (yes im new to Haskell).
toString :: String -> [String]
toString str = ...
filter (not . null) . map (filter Data.Char.isLower . map Data.Char.toLower) . words. Think of it as three stages written right-to-left: break on spaces, within each word, convert to lower and prune out extras, then finally eliminate the empty words.