Skip to content

Instantly share code, notes, and snippets.

@BinRoot
Last active December 31, 2015 17:09
Show Gist options
  • Save BinRoot/8018000 to your computer and use it in GitHub Desktop.
Save BinRoot/8018000 to your computer and use it in GitHub Desktop.
Remove punctuation from a string
clean :: String -> String
clean = foldr (.) id $ map (flip replace "") ["!", "\"", "#", "$", "%", "(", ")", ".", ",", "?"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment