So I\'m trying to triplize an element, i.e. making 2 other copies of the element.
So I\'ve written this:
triplize :: [a] -> [a]
tripl
[x] matches a list of exactly one element. If you want to match any list, just remove [ and ]:
triplize x = concatMap (replicate 3) x
This would turn ["a", "b", "c"] into ["a", "a", "a", "b", "b", "b", "c", "c", "c"].
On the other hand, if you want to take one element and return a list (containing 3 of that element), then your code should be
triplize :: a -> [a]
triplize x = replicate 3 x