Exercise 1.6: (back)


Computing the square roots with new-if causes the program run an infinite loop.  This is
because the new-if function uses applicative order evaluation, which evaluates both the
operand and the operator.

The if form on the other hand is a special form that evaluates the <predicate> part of the
expression first. If the <predicate> evaluates to a true value, the interpreter then
evaluates the <consequent> and returns its value.