(define (the-empty-termlist) '())
(define (empty-termlist? term-list) (null? term-list))
(define (adjoin-term term term-list)
(let ((len (- (order term) (order (first-term term-list)))))
(define (ajoin-zero-iter term-list times)
(if (= 0 times)
term-list
(ajoin-iter (cons 0 term-list) (- times 1))))
(cons (coeff term) (ajoin-zero-iter term-list len))))
(define (first-term term-list)
(make-term (- (length term-list) 1) (car term-list)))
(define (rest-term term-list)
(if (= 0 (cadr term-list))
(rest-term (cdr term-list))
(cdr term-list)))