taocp

taocp sandbox.
git clone git://git.ricketyspace.net/taocp.git
Log | Files | Refs

commit 2132a92f04f6bb4bd86a2c4fc87e6a690f0d774c
parent fb24c5360e1ea6ad6866f593fc1df5d22083c5e1
Author: rsiddharth <s@ricketyspace.net>
Date:   Thu,  2 Feb 2017 03:25:29 +0000

Update function `fib`' docstring.

* guile/taocp/utils/math.scm (fib): Update docstring.

Diffstat:
guile/taocp/utils/math.scm | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/guile/taocp/utils/math.scm b/guile/taocp/utils/math.scm @@ -19,7 +19,11 @@ For instance `(lambda (x) (* x x))` is a valid FX. (else (cons (fx n) (compute-exp1-n fx (1- n)))))) (define (fib n) - "Returns Fibonacci of N." + "Returns Fibonacci of N. + +This function is useless for large values of N. Use `fib-fast` +function defined in (taocp one two eight fib). +" (cond ((= n 0) 0) ((= n 1) 1) (else (+ (fib (- n 1)) (fib (- n 2))))))