This shows you the differences between two versions of the page.
|
exercise_1.32 [2009/03/02 00:24] mariorz |
exercise_1.32 [2009/03/02 01:06] (current) mariorz |
||
|---|---|---|---|
| Line 13: | Line 13: | ||
| (term a) | (term a) | ||
| (accumulate combiner null-value term (next a) next b)))) | (accumulate combiner null-value term (next a) next b)))) | ||
| + | |||
| + | |||
| + | (define (sum term a next b) | ||
| + | (accumulate + 0 term a next b)) | ||
| + | |||
| + | (define (product term a next b) | ||
| + | (accumulate * 1 term a next b)) | ||
| + | |||
| + | |||
| </code> | </code> | ||