I'm working on a string compression problem in Hackerrank in Haskell, and stuck on the IO. I am trying to be explicit about removing quotes.
compress :: [Char] -> [Char]
compress = ...
main :: IO ()
main = do
input <- getLine
let result = compress input
print $ filter (/='"') result
The code compiles and returns the correct response, albeit surrounded in quotes.
Compiler Message
Wrong Answer
Input (stdin)
abcaaabbb
Your Output (stdout)
"abca3b3"
Expected Output
abca3b3
You write:
putStrLn result
instead of last line:
print $ filter (/='"') result