[plt-scheme] multiply-by-pi HTDP 11.5.2

From: wooks wooks (wookiz at hotmail.com)
Date: Tue Jun 20 14:50:20 EDT 2006


I can only solve this problem by using + for  the recursion. because my add 
function only works when at least one of the inputs is a natural number - 

(define (add m n)
    [(zero? n) m]
    [else (add1 (add m (sub1 n)))]

which will obvious not work for the required recursion (add pi 
(multiply-by-pi (- n 1))).

Posted on the users mailing list.