I was wondering why replace is not in base. I thought, it's because it must be easy to implement with standard combinators. Although I do not like prefix syntax of Applicative I wrote it this way:replace a b = map (bool <$> id <*> (const b) <*> (== a))And was slightly surprised after seeing replace in Data.List.Utils:replace old new l = join new . split old $ lAre there non-opinion based reasons to prefer one than the other in public projects?
Replacing items in a list
haskell;comparative review