From 26d06cd99f29808278aea467e290fb548e826902 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Tue, 10 Jun 2014 20:00:19 -0400 Subject: [PATCH] Ex. 1.32: sum and product using accumulate-iter --- 1-3.org | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/1-3.org b/1-3.org index 142f200..80bc638 100644 --- a/1-3.org +++ b/1-3.org @@ -197,6 +197,12 @@ layout: org result (iter (next a) (combiner (term a) result)))) (iter a null-value)) + + (define (sum term a next b) + (accumulate-iter + 0 term a next b)) + + (define (product term a next b) + (accumulate-iter * 1 term a next b)) #+END_SRC ** Exercise 1.33