I'm writing a short program in haskell to find the mean of the list of odd numbers between 1 and 2000 that are not divisible by 3 or 5. I can't get it to compile and keep getting a variety of errors. I made some changes and now the code is giving me a "Parse error on input 'sum'" on line 5 col 9. Could someone tell me what I'm doing wrong please?
--Write a Haskell function that calculates the mean of a list of odd numbers that
--are not divisible by 3 or 5 and whose sum is less than 2000.
mean :: Int
mean = let nums = [x|x <- [1,3..1999], x 'mod' 3 != 0, x 'mod' 5 != 0]
sum nums/length nums
I'm compiling with GHCI. Thanks