6 lines
108 B
Haskell
6 lines
108 B
Haskell
fib x =
|
|
if x < 1
|
|
then 0
|
|
else if x < 2
|
|
then 1
|
|
else fib (x - 1) + fib (x - 2)
|