From 0551a6fd4cfd90466fd6e35eb1e00d31257faf3e Mon Sep 17 00:00:00 2001 From: "Elf M. Sternberg" Date: Wed, 13 May 2015 22:23:30 -0700 Subject: [PATCH] Chapter 3 stub. --- chap3.rkt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 chap3.rkt 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)))) + +