eval.in

Paste #688

Haskell — Hugs98 September 2006, pasted 4 years ago

1
2
3
4
5
6
fib' 0 a b = a
fib' n a b = fib' (n - 1) (a + b) a

fib n = fib' n 0 1

main = putStrLn $ show $ fib 30

Program Output

832040

OK (0.084 sec real, 0.107 sec wall, 19 MB, 23 syscalls)

Fork