You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
-module(fib).
|
|
-export([fibr/1]).
|
|
|
|
|
|
fibr(N) -> fibloop(N, 1, 1).
|
|
|
|
fibloop(0, A, _) -> A;
|
|
fibloop(1, _, B) -> B;
|
|
fibloop(N, A, B) -> fibloop(N-1, B, A+B). |