Implementation of OOP


(define *methods*
  '((pair     (terminal no)      (draw pair-draw)
              (leftx pair-leftx) (rightx pair-rightx)
              (lefty pair-bothy) (righty pair-bothy)
              (width pair-width) (drawline pair-drawline)
              (left car)         (right cdr))
    (integer  (terminal yes)     (draw atom-draw))
    (symbol   (terminal yes)     (draw atom-draw))
    (string   (terminal yes)     (draw atom-draw))
    (null     (terminal yes)     (draw null-draw))
    (box      (terminal yes)     (draw box-draw))
    (triangle (terminal yes)     (draw triangle-draw))
    (mobile   (terminal no)      (draw mobile-draw)
              (leftx same-x)     (rightx same-x)
              (lefty bottom-y)   (righty bottom-y)
              (width zero-width) (drawline mobile-drawline)
              (left cadr)        (right caddr))
    ))


(define (no self)  #f)
(define (yes self) #t)
(define (pair-width self size) (* size 2))

Contents    Page-10    Prev    Next    Page+10    Index