[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: <srfi-15@xxxxxxxxxxxxxxxxx>*Subject*: lexical scoping--Please help*From*: "Mehdia bicha" <bmehdia@xxxxxxxxxxx>*Date*: Thu, 11 Nov 1999 09:40:33 +0100

Hi all, I have the following program, it computes a solution for the equation (x=2*sinx) by doing a set of iterations and estimating a "guess" an improving it. My problem is that I want to display for each iteration the value of "guess". I have to use the procedure "diplay (guess)" but I couldn't find the place where to put this display function---------please help (define (x=2*sinx) (define (good-enough? guess) (< (abs (- guess (* 2 (sin guess)))) 0.001)) (define (improve guess) (* 2 (sin guess))) (define (iter guess) (if (good-enough? guess) guess (iter (improve guess)))) (iter 1))

- Next by Date:
**let-fluid problem** - Next by thread:
**let-fluid problem** - Index(es):