2007-04-24から1日間の記事一覧

link:A Comparison of Portable Dynamic Web Content Technologies for the Apache Server

WEB

http://dmst.aueb.gr/dds/pubs/conf/2002-SANE-DynCont/html/dyncont.html 四年前の文書だし、参考になるかなぁ…

問題1.29

僕の解答 こんな感じかな? (define (cube x) (* x x x)) (define (sum term a next b) (if (> a b) 0 (+ (term a) (sum term (next a) next b)))) (define (indegral f a b dx) (define (add-dx x) (+ x dx)) (* (sum f (+ a (/ dx 2)) add-dx b) dx)) (def…

問題1.30

僕の解答 こんな感じかな? (define (sum term a next b) (define (iter a result) (if (> a b) result (iter (next a) (+ result (term a))))) (iter a 0)) 解答例 http://oss.timedia.co.jp/show/SICP/ex-1.30 http://www.csus4.net/hiki/SICPReading/?1.30

問題1.31

僕の解答 (define (product term a next b) (if (> a b) 1 (* (term a) (product term (next a) next b)))) ;(define (product term a next b) ; (define (iter a result) ; (if (> a b) ; result ; (iter (next a) (* result (term a))))) ; (iter a 1)) (d…