从2.1.4节开始的扩展练习中,您可以找到练习2.8:
练习2.8。使用类似于Alyssa的推理,描述如何计算两个间隔的差异。定义一个相应的减法过程,称为子间隔.
我写了以下文章:
(define (sub-interval x y)
(make-interval (- (lower-bound x) (upper-bound y))
(- (upper-bound x) (lower-bound y))))你认为如何?
发布于 2011-04-05 11:05:23
真不错。不要忘记将lower-bound和upper-bound分别定义为car和cdr。
https://codereview.stackexchange.com/questions/1638
复制相似问题