2 lines
108 B
Text
2 lines
108 B
Text
fib n | n < 0 = fail "Negative n"
|
|
| else = fix (\f n -> if n < 2 then n else f (n - 1) + f (n - 2)) n
|