Make "if" with "cond"? Why not?
(define (new-if predicate if-clause else-clause)
(cond
(predicate if-clause)
(else else-clause) ))
And next I tried to use it in some function:
(define (sqrt x)
(define (sqrt-iter guess x)
(new-if
(<
(abs (- (* guess guess) x))
0.0001 )
guess
(sqrt-iter
(/ (+ guess (/ x guess)) 2)
x )))
(sqrt-iter 1. x) )
(sqrt 3)
Why I get "maximum recursion depth exceeded"?