This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: (if result (what-if-found (cadr result)) (what-if-not)) ) ) ; ***** ; Set up of types for data-directed programming. (define list-set-type (make-type 'list ... ) ) (define intvls-set-type (make-type 'intvls ... ) ) ; ***** ; Generic operations on sets. (define (member? x set) ((operate 'member? set) x) ) (define (with-element x set) ((operate 'with-element set) x) ) (define (elements set) ((operate 'elements set)) ) ; ***** ; Utility functions. (define (find-if p L) (cond ((null? L) #f) ((p (car L)) (car L)) (else (find-if p (cdr L))) ) )...
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