ペアによる区間の実装
(define (make-interval a b)
  (cons a b))
(define (lower-bound x) (car x))
(define (upper-bound x) (cdr x))
(define (print-interval x)
  (display "[")
  (write (lower-bound x))
  (display ",")
  (write (upper-bound x))
  (display "]\n")
  'done)

一覧 前へ 次へ