(define (look-up given-key set)
(cond
((null? set) #f)
((= given-key (key (car set))) #t)
((< given-key (key (car set)))
(look-up given-key (left-branch set)))
((> given-key (key (car set)))
(look-up given-key (right-branch set)))))
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment