fib computes the nth fibonacci number (1-indexed)

fib(n)

Arguments

n

an integer

Value

the nth fibonacci number

Details

This function calls itself for each recursive computation.

Examples

fib(10)
#> [1] 55