Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (8 sloc) 381 Bytes
(define (lookup given-key set-of-records)
(cond ((null? set-of-records) false)
((equal? given-key (key (entry set-of-records)))
given-key)
((< given-key (key (entry set-of-records)))
(lookup given-key (left-branch set-of-records)))
((> given-key (key (entry set-of-records)))
(lookup given-key (right-branch set-of-records)))))