:: Eq a => [a] -> [a] -> [a] -> [a] -package:stack

Replace a subsequence everywhere it occurs.
replace "el" "_" "Hello Bella" == "H_lo B_la"
replace "el" "e" "Hello"       == "Helo"
replace "" "x" "Hello"         == "xHxexlxlxox"
replace "" "x" ""              == "x"
\xs ys -> replace xs xs ys == ys
Given a list and a replacement list, replaces each occurance of the search list with the replacement list in the operation list. Example:
replace "," "." "127,0,0,1" -> "127.0.0.1"
This could logically be thought of as:
replace old new l = join new . split old $ l
\(NonEmpty xs) ys -> replace xs xs ys == (ys::String)
\(NonEmpty xs) (NonEmpty ys) -> equating (take 1000) (replace xs ys (cycle xs)) (cycle (ys::String))
Replaces a subsequence by another in a sequence Taken from http://bluebones.net/2007/01/replace-in-haskell/
>>> replace "foo" "baz" "foobar"
"bazbar"

>>> replace "some" "thing" "something something"
"thingthing thingthing"

>>> replace "not" "" "something"
"something"

>>> replace "" "here" "something"
"heresomething"
Generalized version of bracket_. Note any monadic side effects in m of both the "acquire" and "release" computations will be discarded. To keep the monadic side effects of the "acquire" computation, use bracket with constant functions instead. Note that when your acquire and release computations are of type IO it will be more efficient to write:
liftBaseOp_ (bracket_ acquire release)
between open close p parses open, followed by p and close. Returns the value returned by p.
braces  = between (symbol "{") (symbol "}")
between open close p parses open, followed by p and close. Returns the value returned by p.
braces = between (symbol "{") (symbol "}")
Version of bracket without any value being passed to the second and third actions.
Same as bracket, but does not pass the acquired resource to cleanup and use functions. For more information, see base's bracket_.
A variant of bracketOnError where the return value from the first computation is not required.
Async safe version of bracket_
A variant of bracketOnError where the return value from the first computation is not required.
Async safe version of bracket_
A variant of bracketOnError where the return value from the first computation is not required.
Parse a bracketed item, discarding the brackets. If everything matches except the closing bracket, the whole parse fails soft, which can give less-than-satisfying error messages. If you want better error messages, try calling with e.g. bracket open (commit close) item
A variant of bracket where the return value from the first computation is not required.
Generalized version of bracket_. Note, any monadic side effects in m of both the "acquire" and "release" computations will be discarded. To keep the monadic side effects of the "acquire" computation, use bracket with constant functions instead.
Point-wise conditional
if' lifted to Monad. Unlike liftM3 if', this is short-circuiting in the monad, such that only the predicate action and one of the remaining argument actions are executed.