The pattern "[x]" only matches singleton lists.
Pajo Patak wrote:
I want to return a list, from and list of lists (all integers), where
is the erroe in the code?
nthList :: [[a]] -> Int -> [a]
nthList ([x]:xs) 1 = [x]
nthList ([x]:xs) (n+1) = nthListh xs n