X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment9.mdwn;h=dfc4d4756db22df6ffd5f0d614bc2aa47904a9e8;hp=b991c525d39e0e405ac411007e91eb82bfb4af61;hb=e21a78a6e0da3fadde316e410fc877a4dd218507;hpb=d08c54cb6bf8c3d2513708ba18460b5077b7041e;ds=sidebyside diff --git a/assignment9.mdwn b/assignment9.mdwn index b991c525..dfc4d475 100644 --- a/assignment9.mdwn +++ b/assignment9.mdwn @@ -4,7 +4,6 @@ Using continuations to solve the same-fringe problem The problem ----------- -We've seen two solutions to the same fringe problem so far. The problem, recall, is to take two trees and decide whether they have the same leaves in the same order. @@ -26,6 +25,7 @@ let tc = Node (Leaf 1, Node (Leaf 3, Leaf 2));; So `ta` and `tb` are different trees that have the same fringe, but `ta` and `tc` are not. +We've seen two solutions to the same fringe problem so far. The simplest solution is to map each tree to a list of its leaves, then compare the lists. But because we will have computed the entire fringe before starting the comparison, if the fringes differ in an