<i><ahref="http://d.hatena.ne.jp/asin/0262510871"onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/asin/0262510871', 'Structure and Interpretation of Computer Programs (MIT Electrical Engineering and Computer Science)');">Structure and Interpretation of Computer Programs (MIT Electrical Engineering and Computer Science)</a></i>を読む、その2です。今回は
</p>
<ul>
<li>
compound procedure(例えば (define (square a) (* a a))しておいてから、(define (sum-of-square a b) (+ (square a) (square b)))と書いた時の「(define (sum-of-square a b) (+ (square a) (square b)))」のこと) <ul>
<li>
substitution model (インタープリタ内部でどのようにcompound proedureを評価するのか。暫定的な説明として、「手続きを置き換え(substitute)てprimitiveな手続きのみの組み合わせに変換する」というモデルが導入される。でも、これは後で破綻するよ!って書いてあった) <ul>
<spanclass="synSpecial">(</span><spanclass="synStatement">*</span> n n<spanclass="synSpecial">))</span>
<spanclass="synSpecial">(</span><spanclass="synStatement">cond</span> [<spanclass="synSpecial">(</span><spanclass="synStatement">and</span><spanclass="synSpecial">(</span><spanclass="synStatement"><</span> a b<spanclass="synSpecial">)</span><spanclass="synSpecial">(</span><spanclass="synStatement"><</span> a c<spanclass="synSpecial">))</span><spanclass="synSpecial">(</span><spanclass="synStatement">+</span><spanclass="synSpecial">(</span>square b<spanclass="synSpecial">)</span><spanclass="synSpecial">(</span>square c<spanclass="synSpecial">))</span>] <spanclass="synComment">; when a is the smallest</span>
[<spanclass="synSpecial">(</span><spanclass="synStatement">and</span><spanclass="synSpecial">(</span><spanclass="synStatement"><</span> b a<spanclass="synSpecial">)</span><spanclass="synSpecial">(</span><spanclass="synStatement"><</span> b c<spanclass="synSpecial">))</span><spanclass="synSpecial">(</span><spanclass="synStatement">+</span><spanclass="synSpecial">(</span>square a<spanclass="synSpecial">)</span><spanclass="synSpecial">(</span>square c<spanclass="synSpecial">))</span>] <spanclass="synComment">; when b is the smallest</span>
[<spanclass="synSpecial">(</span><spanclass="synStatement">and</span><spanclass="synSpecial">(</span><spanclass="synStatement"><</span> c a<spanclass="synSpecial">)</span><spanclass="synSpecial">(</span><spanclass="synStatement"><</span> c b<spanclass="synSpecial">))</span><spanclass="synSpecial">(</span><spanclass="synStatement">+</span><spanclass="synSpecial">(</span>square a<spanclass="synSpecial">)</span><spanclass="synSpecial">(</span>square b<spanclass="synSpecial">))</span>]<spanclass="synSpecial">))</span><spanclass="synComment">; when c is the smallest</span>