22 hours ago
my attempt to do the exercises in sicp.
Tuesday, July 8, 2008
sicp exercise 2.7
; 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.
(define (make-interval a b) (cons a b))
(define (upper-bound interval) (car interval))
(define (lower-bound interval) (cdr interval))