summaryrefslogtreecommitdiff
path: root/tools/trec.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tools/trec.scm')
-rw-r--r--tools/trec.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/trec.scm b/tools/trec.scm
index 901ff72..9fba9fd 100644
--- a/tools/trec.scm
+++ b/tools/trec.scm
@@ -5,8 +5,8 @@
`(if (not ,test) (begin ,@body))))
(define (fib n)
- (if (< n 2)
- n
+ (if (<= n 2)
+ 1
(+ (fib (- n 1))
(fib (- n 2)))))
@@ -16,10 +16,10 @@
(define (fibr n)
- (if (>= n 2)
+ (if (> n 2)
(+ (fibr (- n 1))
(fibr (- n 2)))
- n))
+ 1))
(let ((f32 (fibr 32)))
(unless (= f32 2178309) ;3524578)