<< Previous exercise (2.88) | Index | Next exercise (2.90) >>

;; an even shorter solution to achieve the same result (define (first-term term-list) (make-term (- (len term-list) 1) (car term-list))) (define (adjoin-term term term-list) (cond ((=zero? term) term-list) ((=equ? (order term) (length term-list)) (cons (coeff term) term-list)) (else (adjoin-term term (cons 0 term-list)))))

meteorgan