Basic Operations for Objects

left top right

(define (get-method-from-object message object)
  (object message))

(define get-method     ; Simplification
   get-method-from-object)

(define no-method
  (let ((tag (list 'NO-METHOD)))
    (lambda () tag)))

(define (method? x)
  (cond ((procedure? x) #T)
        ((eq? x (no-method)) #F)
        (else
          (error
             "Object returned this non-message:" x))))

Jim Miller W3C