読者です 読者をやめる 読者になる 読者になる

(wat-aro)

無職から有職者にランクアップしました

SICP 問題 2.66

(define (lookup-tree given-key set-of-records)
  (cond (let ((key-record (key (car set-of-records))))
          ((null? set-of-records) false)
          ((= given-key key-record)
           (car set-of-records))
          ((< given-key key-record)
           (lookup-tree given-key (left-branch set-of-records)))
          ((< key-record given-key)
           (lookup-tree given-key (right-branch set-of-records))))))