Hey i've been stuck on the following problem and cant seem to come up with the correct function.
Write a recursive function that, given a positive integer k, computes the product k: (1-1/2)(1-1/3)(1-1/k)... as k decreases by one.
I cant seem to come up with the correct function i the program usually runs till it has no more memory left. Here is my method:
(define (fraction-product k)
(if (= k 0)
0
(* (- 1 (/ 1 (fraction-product (- k 1)))))))
thanks for any help in advance...