Project Euler #2 in Haskell Problem

By considering the terms in the Fibonacci sequence whose values do not 
exceed four million, find the sum of the even-valued terms.

My solution

-- Formula for finding n-th Fibonacci number
fibonacci 1 = 1
fibonacci 2 = 2
fibonacci n
    | n &gt;= 3    = fibonacci (n - 1) + fibonacci (n - 2) 
    | otherwise = fibonacci 2 + fibonacci 1

-- Intermediate code: list of first 32 Fibonacci numbers
fibonacciList = [fibonacci i | i &lt;- [1..32]]

-- list of even Fibonacci numbers from fibonacciList
evenFibonacci = [eF | eF &lt;- fibonacciList, eF `mod` 2 == 0]

-- list of evenFibonacci from fibonacciList not exceeding 4 million
evenFibonacci' = [eF' | eF' &lt;- evenFibonacci, eF' &lt;= 4000000]

-- sum of the even fibonacci numbers not exceeding 4 million
sumEvenFibonacci' = sum evenFibonacci'

-- display the result
main = print sumEvenFibonacci
Your fibonacci function is veryyyyyy slow.
Why? Well

fibonacci 5 = fibonacci 3 + fibonacci 4
            = fibonacci 1 + fibonacci 2 + fibonacci 2 + fibonacci 3
            = 1 + 2 + 2 + fibonacci 1 + fibonacci 2
            = 8


Do you see what's wrong? That's right, you computed fibonacci 3 two times.
So, for high values of n, you are going to compute it a lot!
The naive linear fibonacci is usually written as fibonacci = 0 : 1 : (zipWith (+) fibonacci (tail fibonacci)) and is explained here: https://stackoverflow.com/questions/43486880/take-n-with-zipwith-and-tail

Another tip: Do not overuse list comprehension, it tends to get very unreadable fast. For instance your:

evenFibonacci' = [eF' | eF' &lt;- evenFibonacci, eF' &lt;= 4000000]


Is misleading because it wouldn't work if evenFibonacci is infinite (but it really should). I believe that is why you declared fibonacciList as finite, while there wasn't any reason to.
So how could we make it so it does? Well we know evenFibonacci is strictly increasing, so we could take advantage of it:

evenFibonacci' = takeWhile (&lt;= 40000) evenFibonacci


Similarilly fibonacci &lt;$&gt; [1 .. 32] is even shorter than your version.
(I'll let you rewrite evenFibonacci on your own ;) )

Finally I advise you not to do so many variable declarations, declarations are fine when those variables can be standalones, but it isn't really the case of your evenFibonacci'. You really should either compose variables or use some where

Have fun!