4 ms·
Actually he addresses that and proposes syntax to address it. let fib = fun(N) -> fib(N, 1, 0) end in fib(N, A, B) when N < 2 -> A; fib(N
by ericflo 15y ago
Actually he addresses that and proposes syntax to address it.
let fib = fun(N) -> fib(N, 1, 0) end
in
fib(N, A, B) when N < 2 -> A;
fib(N, A, B) -> fib(N-1, A+B, A).
end.
Where everything in the "in" block would be hidden.
- bartonfink 15y agoYou are absolutely right. When I read his post, that's squirreled away in a discussion about syntax and I missed it. I stand corrected.