From: Chris Barker Date: Tue, 7 Dec 2010 17:58:12 +0000 (-0500) Subject: edit X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=e21a78a6e0da3fadde316e410fc877a4dd218507 edit --- 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