Task: | Merkkijono |
Sender: | funkar |
Submission time: | 2017-10-09 17:30:59 +0300 |
Language: | Haskell |
Status: | COMPILE ERROR |
Compiler report
input/code.hs:17:3: Not in scope: `putStrLm' Perhaps you meant one of these: `putStrLn' (imported from Prelude), `putStr' (imported from Prelude)
Code
import Data.List j :: String -> String matches :: String -> Bool dropFirst :: String -> String matches xs = length xs /= length (nub xs) j (xs) | not (matches xs) = xs | otherwise = j (dropFirst xs) dropFirst x | length (head g) /= 1 = concat (tail g) | otherwise = head g ++ dropFirst (concat (tail g)) where g = group x main = do putStrLm (j getLine)