2013-01-20から1日間の記事一覧
1.1.8ブラックボックス抽象としての手続き(p14-17) 再帰的であることに注意 それ自身を使って手続きが定義出来るという考えは紛らわしい 再帰については後で触れる sqrtのプログラムは手続きの"束"であるといえる 問題の部分問題への分割を反映している 手続…
問題1.6(p14) とりあえずnew-ifを書いてみる。 (define (square x) (* x x)) (define (abs x) (if (> x 0) x (- x))) (define (new-if predicate then-clause else-clause) (cond (predicate then-clause) (else else-clause))) (define (sqrt-iter guess x)…