
(define tolerance 0.0000001)
(define (fixed-point f first-guess)
(define (close-enough? v1 v2)
(< (abs (- v1 v2)) tolerance))
(define (try guess)
(let ((next (f guess)))
(newline)
(display next)
(if (close-enough? next guess)
next
(try next))))
(try first-guess))
I use the calysto_scheme kernel in my jupyter. The code was running ok in MIT-scheme but in scheme kernel there was something wrong. So I think there must have a bug in it.
thank you.
I use the calysto_scheme kernel in my jupyter. The code was running ok in MIT-scheme but in scheme kernel there was something wrong. So I think there must have a bug in it.
thank you.