I have just started Haskell, and I want to check if my code is following the spirit of the language.
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.
fibonacci :: [Int]
fibonacci = 1 : 1 : (next 1 1)
where
next x y = sxy : (next y sxy)
where
sxy = x + y
main = do
putStrLn $ show $ sum $ filter odd $ takeWhile (< 4000000) fibonacci