I am trying to split a string in to a list of characters and removing any non-letters in the process. Here is my code so far:
getCharList :: String -> [String]
getCharList x = [filter isLetter c | c <- splitOn "" x, c /= ""]
The output I receive from, for example:
getCharList "Why doesn't this work"
is:
["W","h","y","","d","o","e","s","n","","t","","t","h","i","s","","w","o","r","k"]
Could someone please explain why this doesn't seem to be able to remove the empty characters?