I have just started using Haskell interpreter.
Can anyone tell me what's wrong with this code:(for Fibonacci)
fib :: Int -> Int
fib n
|n==0 =0
|n==1 =1
|n>1 =fib(n-2) + fib(n-1)
I am getting this error message:
fib.hs:3:1: parse error on input `|'
[1 of 1] Compiling Main ( fib.hs, interpreted )
Failed, modules loaded: none.