Given the following function signature:
concatThings :: (Show a) => a -> String -> String
concatThings any str2 = str2 ++ (show any)
If run concatThings "there" "hi", then result will be: "hi\"there\"", but what I want is just "hithere".
How can I still get “hithere” with this function signature?
You could wrap the string in a new type and provide a simple Show instance for it:
and then pass in a wrapped string to the
concatThingsfunction: