5.5.5. An Example of Compiled Code
Exercise 5.33

Сompare the resulting code of a factorial procedure

Consider the following definition of a factorial procedure, which is slightly different from the one given above:

(define (factorial-alt n)
  (if (= n 1)
      (* n (factorial-alt (- n 1)))))

Compile this procedure and compare the resulting code with that produced for factorial. Explain any differences you find. Does either program execute more efficiently than the other?

Nobody's finished this exercise yet. You'll be the first!

There are no comments yet.

Authentication required

You must log in to post a comment.