-module(fib). -export( [fib/1]). fib(I) -> fib(I,0,1). fib(0,Current,_Next) -> Current; fib(I,Current,Next) -> fib(I-1,Next,Current+Next).