以下の内容はhttps://kiririmode.hatenablog.jp/entry/20071013/p3より取得しました。


問題1-31(b)

問題1-31(a) - 理系学生日記のproductは反復的プロセスだったので、次に再帰的プロセスのproductかく。

(define (product-recursive term a next b)
  (if (> a b)
      1
      (* (term a)
	 (product-recursive term (next a) next b))))

もちろん6!を計算する。

gosh> (product-recursive identity 1 inc 6)
720



以上の内容はhttps://kiririmode.hatenablog.jp/entry/20071013/p3より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14