Tail recursion

Dale Harvey harveyd@REDACTED
Fri Dec 16 08:30:20 CET 2005


oops, take out that 1 in fib1

fib(A,B,C,_) when A == B -> C;
fib(A,B,C,D) -> fib(A,B+1,C+D,C).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20051216/76630584/attachment.htm>


More information about the erlang-questions mailing list