3 ms·
> But rarely in these discussions will you find relevant mathematical considerations. If the goal is to compute a Fibonacci number or a factorial, the proper so
by lispm 13y ago
> But rarely in these discussions will you find relevant mathematical considerations. If the goal is to compute a Fibonacci number or a factorial, the proper solution is not a recursive function, but rather knowledge of mathematics.
THE introduction to the Lisp culture, SICP, discusses exactly this on page 35 (first edition).
See also:
http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html#%_sec_1.2.2 http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html...