next up previous contents
Next: Class `cat' Up: 2nd example of object Previous: Class `animal'   Contents

Class `dog'


(define make-dog
  (lambda(aname)
    (define super (make-animal aname))
;
    (define who-are-you
      (lambda()
        (print "Wau wau: ")
        (print ((super 'get-name)))))
;
    (define self
      (lambda(msg)
        (if (equal msg 'who-are-you)
            who-are-you
            (super msg))))
     self))



Georg P. Loczewski 2004-03-05


Impressum und Datenschutz