This preview shows page 1. Sign up to view the full content.
Unformatted text preview: (default-method (* message message)) (method (7) 'buzz) ) (define-class (counter) (instance-vars (count 0)) (class-vars (total 0) (counters '())) (initialize (set! counters (cons self counters))) (method (next) (set! total (1+ total)) (set! count (1+ count)) (list count total))) (define-class (pigger name) (parent (person name)) (method (pigl wd) (if (member? (first wd) '(a e i o u)) (word wd 'ay) (ask self 'pigl (word (bf wd) (first wd))) )) (method (say stuff) (if (not (pair? stuff)) (if (equal? stuff 'my) (usual 'say stuff) (ask self 'pigl stuff)) (map (lambda (w) (ask self 'say w)) stuff))) )...
View Full Document
This note was uploaded on 11/30/2010 for the course EECS 21281 taught by Professor Harvey during the Spring '10 term at University of California, Berkeley.
- Spring '10