So I am trying to program a function in haskell which does the following things: 1. Input is a string 2. function first removes all letters of the string and only numbers remain 3. function converts the string numbers to int numbers 4. function sums the numbers in the string together and prints it out
My Code til' Step #3
func str =
do
str <- filter (< 'a') str
str2 <- map digitToInt str
return str2
somehow this doesn't work if I remove the 4th line with map digitToInt it works til step #2 fine but I dont know what the problem here is
The Error is an couldnt match expected type [Char] with actual type Char
Thank you in advance