This is exercise 3.1 of Real World Haskell. I have my length function like this:
myLength [] = 0
myLength (_:xs) = 1 + (myLength xs)
And I assumed the type signature is like this:
mylength :: [a] -> Num
But when I wrote this into the file and reloaded it into ghci, there is an error.
The type signature for `mylength' lacks an accompanying binding
Failed, modules loaded: none.
myLength :: (Num t1) => [t] -> t1