Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 456 Bytes

6.md

File metadata and controls

13 lines (9 loc) · 456 Bytes

Exercise 1.5

As the new-if is not a special form, scheme lang uses an applicative order evaluation when evaluating the function.

See the operands of the function:

(define (new-if <predicate> then-clause else-clause)
    <body>)

Predicate, then-clause and else-clause are all evaluated first before the new-if procedure is being evluated

Since our else-clause is a recursive call to itself, our new-if will cause an infinite recursion