PPT Slide
1.41
Two-Sided Recursion
Searching for a Value in a Tree. Assume this kind of structure
TR
A
B
C
D
E
( defun search ( val TR )
( cond
( ( null TR ) NIL )
( ( atom TR ) (eql TR val ) )
( T
(or
( search val ( car TR ) )
( search val ( cdr TR ) ) )
) )
Previous slide
Next slide
Back to first slide
View graphic version