In applicative-order Scheme, when call (factorial 5), the call will not end. because, when call unless, even if(= n 1) is true,(factorial (- n 1)) will be called. so n will be 5, 4, 3, 2, 1, 0, -1 .... . In normal-order Scheme, this will work, Because normal-order Scheme uses lazy evaluation, when (= n 1) is true,(factorial n) will not be called.

In "normal order" (as described in first chapter) Scheme this procedure should also loop forever. Since normal order does not necessarily means lazy.

So normal order evaluation expands procedures and arguments to most primitive form and only then evaluate it. In this case evaluator would keep expanding (factorial (- n 1)) forever.

Annonymous

Here is an implementation in the underlying scheme to see that it indeed works this way.

krubar

In "normal order" (as described in first chapter) Scheme this procedure should also loop forever. Since normal order does not necessarily means lazy.

So normal order evaluation expands procedures and arguments to most primitive form and only then evaluate it. In this case evaluator would keep expanding (factorial (- n 1)) forever.