>average (x:xs) = s/l
>                    where
>                   s=sum(x:xs) && l=(x:xs)
>
>I am a beginner studying on my own. I would appreciate it if you could
explain what I should and should not do.

There are many errors in this small code snippet, I will just point out a
few:

(a) there is no need to use x:xs anywhere in the program, as nowhere you are
splitting/combining the list.
(b) you are trying to divide a number by a list, which is even harder than
comparing apples and oranges.
(c) your are taking the conjunction of two definitions

Erik




Reply via email to