You are viewing a single comment's thread. Return to all comments →
Haskell
import qualified Data.Set as S remDupe "" _ = "" remDupe (c:cs) seen = if S.member c seen then remDupe cs seen else c:(remDupe cs $ S.insert c seen) main = do cs <- getLine putStr $ remDupe cs S.empty
Seems like cookies are disabled on this browser, please enable them to open this website
Remove Duplicates
You are viewing a single comment's thread. Return to all comments →
Haskell