(define in-tree?
(lambda (symbol tree-of-symbols)
(if (not (pair? tree-of-symbols))
(equal? tree-of-symbols symbol)
(or (letrec ((branch-test
(lambda (branch)
(if (not (pair? branch))
(equal? symbol branch)
(if (pair? (car branch))
(branch-test (car branch))
(or (equal? (car branch) symbol)
(branch-test (cdr branch))))))))
(branch-test (car tree-of-symbols)))
(in-tree? symbol (cdr tree-of-symbols))))))