
16 Jun
2012
16 Jun
'12
2:03 p.m.
Hi, this is probably an easy question, but i simply can't figure out, why this does not work: import Data.Char main = do contents <- getContents putStrLn $ show $ splitcomma contents splitcomma = split ',' split :: Char -> String -> [String] split _ "" = [""] split sp (c:cs) | c == sp = "": rest | otherwise = (c : head rest) : tail rest where rest = split sp cs The program compiles and runs without any problems. But there is absolutely no output, when f.eg. i type "hello, world" and hit return. Why would that be? Thank you very much