On 9/10/25 14:51, Bradley Lucier wrote:
But if I *don't* include the file but include the definition of -
computable by itself:
#; (include "arithmetic.scm")
(define (->computable r) (if (not (rational? r)) (error "->computable: argument is not rational: " r) (let ((r (exact r))) (cond ((integer? r) (case r ((0) computable-zero) ((1) computable-one) ((-1) computable-negative-one) (else (lambda (n) (arithmetic-shift r n))))) ;;<< the result ((power-of-two? (denominator r)) (let ((num (numerator r)) (log_2-den (first-set-bit (denominator r)))) (lambda (n) (arithmetic-shift num (- n log_2-den))))) (else (computable-memoize (lambda (n) (round (* r (expt 2 n))))))))))
then the problem goes away!!!!
And if I comment out everything in arithmetic.scm except for the definition of ->computable and include arithmetic.scm, the problem also goes away.
Giving up for now.
But no macros!
Brad