• + 0 comments
    removeDuplicates :: String -> String
    removeDuplicates string = foldl (\acc char -> if char `elem` acc then acc else acc ++ [char]) [] string
    
    main = do
        line <- getLine
        putStr $ removeDuplicates line