diff --git a/chap3.rkt b/chap3.rkt new file mode 100644 index 0000000..c1c42a9 --- /dev/null +++ b/chap3.rkt @@ -0,0 +1,10 @@ +(define (find-symbol id tree) + (call/cc + (lambda (exit) + (define (find tree) + (if (pair? tree) + (or (find (car tree)) (find (cdr tree))) + (if (eq? tree id) (exit #t) #f))) + (find tree)))) + +