Consider the program

(define fact
  (lambda (n)
    (if (zero? n)
      (1)
      (* n (fact (sub1 n))))))

which has an obvious error (extra parens around the ’1′). How much difference is there between this program and this one?

(define fact
  (lambda (n)
    (if (zero? n)
      1
      (* n (fact (sub1 n))))))

Not much is the correct answer. STRING-EDIT claims we have only two operations; in terms of the parse tree, there is only one deletion–an empty child node that used to hang of the ’1′. Yet, this is the kind of difference, I think, that I’m interested in when examining code changes between compiles.

Its a neat problem. Time to write it up with pictures and more analytical detail and a more thorough examination of potential changes that I might want to be interested in.

Do you care? No! Currently, I’m listening to Funeral Sentences (plainchant) from the album “The Cardinall’s Musick – Music at All Souls, Oxford” directed by Carwood, Andrew

Comments are closed.