内容 2.1 Introduction to Data Abstraction · 82
练习 自检推理
Exercise 2.7: Alyssa’s program is incomplete
because she has not specified the implementation of the interval abstraction.
Here is a definition of the interval constructor:
(define (make-interval a b) (cons a b))
Define selectors upper-bound and lower-bound to complete the
implementation.
练习 2.7:Alyssa 的程序尚不完整,因为她还没有给出区间抽象的实现。以下是区间构造函数的定义:
(define (make-interval a b) (cons a b))
请定义选择函数 upper-bound 和 lower-bound 以完成实现。
SICP source code scheme
(define (make-interval a b) (cons a b)) 我的笔记 自动保存