replaceTail :: String -> String -> String -> String
replaceTail what with target = let n              = length what
                                   m              = length target - n
                                   (thead, ttail) = splitAt m target
                               in if ttail == what then thead ++ with else target
replaceTail :: String -> String -> String -> String
replaceTail what with target = let n              = length what
                                   m              = length target - n
                                   (thead, ttail) = splitAt m target
                               in if ttail == what then thead ++ with else target
replaceTail what with target = let n              = length what
                                   m              = length target - n
                                   (thead, ttail) = splitAt m target
                               in if ttail == what then thead ++ with else target