new files
This commit is contained in:
parent
3af7344581
commit
86c034bb8b
1364 changed files with 21352 additions and 0 deletions
5
Task/Binary-strings/Haskell/binary-strings-7.hs
Normal file
5
Task/Binary-strings/Haskell/binary-strings-7.hs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{- Much thanks to brool.com for this nice
|
||||
and elegant solution. Using an imported standard library
|
||||
(Text.Regex), replace a given substring with another -}
|
||||
strReplace :: String -> String -> String -> String
|
||||
strReplace old new orig = subRegex (mkRegex old) orig new
|
||||
Loading…
Add table
Add a link
Reference in a new issue