I'm a beginner in Haskell, and I was trying to write the fibonacci function, but every time I run it my pc freezes. I have no idea why. This is my code:
fib n = if n<=2 then 1 else (fib n-1)+(fib n-2)
I don't know if it is of any help but I'm using GHC in Ubuntu 20.04