I wrote a haskell script to find the odd numbers in a list and show them on the screen, but I get an error when it comes to displaying the results.
impares[] =[]
impares(x:xs)
|(mod(x 2)==0) = impares xs
|otherwise = x:(impares xs)
The error is as follows:
no instance for (show (a10 -> a0)) arising from a use of 'print'
Apparently there is nothing wrong with my code, but I can not execute this program! Can someone give a light?