fibonacci :: Int -> Int
-- testing 8 combinations of argument values
-- looking through 2 candidates of size 1
-- looking through 2 candidates of size 2
-- looking through 6 candidates of size 3
-- looking through 1 candidates of size 4
-- looking through 11 candidates of size 5
-- looking through 5 candidates of size 6
-- looking through 27 candidates of size 7
-- looking through 20 candidates of size 8
-- looking through 95 candidates of size 9
-- looking through 140 candidates of size 10
-- looking through 407 candidates of size 11
-- looking through 825 candidates of size 12
-- looking through 2153 candidates of size 13
fibonacci n = if n <= 1 then 1 else fibonacci (dec n) + fibonacci (dec (dec n))
fib01 :: Int -> Int -> Int -> Int
-- testing 8 combinations of argument values
-- looking through 4 candidates of size 1
-- looking through 4 candidates of size 2
-- looking through 9 candidates of size 3
-- looking through 21 candidates of size 4
-- looking through 43 candidates of size 5
-- looking through 84 candidates of size 6
-- looking through 192 candidates of size 7
-- looking through 391 candidates of size 8
-- looking through 840 candidates of size 9
-- looking through 9294 candidates of size 10
-- looking through 37807 candidates of size 11
-- looking through 166308 candidates of size 12
fib01 x y z = if z <= 0 then y else fib01 y (x + y) (dec z)