Skip to content

Instantly share code, notes, and snippets.

@Javran
Created November 11, 2012 10:26
Show Gist options
  • Save Javran/4054438 to your computer and use it in GitHub Desktop.
Save Javran/4054438 to your computer and use it in GitHub Desktop.
4-consecutive-underlines replacement?
ulReplace :: String -> String
ulReplace ('_':'_':'_':'_':xs) = "1111" ++ xs
ulReplace (x:xs) = x :(replace xs)
ulReplace x = x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment