Lists in Haskell are "type-homogeneous": they can only have one type in them. So you can't ever have a list like `['a',9].
You can have a tuple ('a',9)
. You can also have a list of tuples, such as [('a',9)]
. But then all tuples in that list must be of type (Char, Integer)
.
See also: http://en.wikibooks.org/wiki/Haskell/Lists_and_tuples
But what is your motivation for not using the plain old replicate function?
ghci> replicate 9 'a'
"aaaaaaaaa"