We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(define (install-polynomial-package) ;; ... (put '=zero? 'polynomial (lambda(poly) (or (empty-termlist? (term-list poly)) (= 0 (first-term (coeff (term-list poly))))))) 'done)
应该不能只判断最高项的系数,而且如果想获得更好的抽象能力的话使用=zero?代替= 0应该会更好,(coeff (term-list poly))应该也有错
下面是我自己写的
(define (install-polynomial-package) ... (define (=zero? poly) (define (zero-terms? termlist) (if (empty-termlist? termlist) true (and (=zero? (coeff (first-term termlist))) (zero-terms? (rest-terms termlist))))) (zero-terms? (term-list poly))) (put '=zero '(polynomial) =zero?) ... )
2.87----------
如果有错的话,欢迎大家纠正
The text was updated successfully, but these errors were encountered:
No branches or pull requests
应该不能只判断最高项的系数,而且如果想获得更好的抽象能力的话使用=zero?代替= 0应该会更好,(coeff (term-list poly))应该也有错
下面是我自己写的
2.87----------
如果有错的话,欢迎大家纠正
The text was updated successfully, but these errors were encountered: