I think the problem here is with-let -- it is blocking
the normal optimizations that would otherwise speed
up fib.  Here is an ugly substitute:

(let ((temp-value #f))
    (define *texmacs-module* (curlet))
    (define-macro (tm-define head . body)
      `(eval (list 'define ',head ',@body) *texmacs-module*))

    (let ()
(tm-define fib (lambda (n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2)))))))

    (let ((n 40))
        (format *stdout* "(fib ~A) : ~A \n" n (fib n))))

There has to be a prettier way to do it!

with-let should not be so paranoid...

_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to