Skip to content

Instantly share code, notes, and snippets.

@yakreved
Created August 13, 2013 07:36
Show Gist options
  • Save yakreved/6218727 to your computer and use it in GitHub Desktop.
Save yakreved/6218727 to your computer and use it in GitHub Desktop.
sicp 2.7 Программа Лизы неполна, поскольку она не определила, как реализуется абстракция интервала. Вот определение конструктора интервала: (define (make-interval a b) (cons a b)) Завершите реализацию, определив селекторы upper-bound и lower-bound.
(define (make-interval a b) (cons a b))
(define (upper-bound x) (car x))
(define (lower-bound x) (cdr x))
(upper-bound (make-interval 4 5))
(lower-bound (make-interval 4 5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment