X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment8.mdwn;h=a1e0140c7ce3a996553cea799b013d3464b5f5c6;hp=e6c6085d309396f917b51d60cac383077f346a78;hb=d30463cb5a4ac07600f4b587249edde28270dfcf;hpb=826badc8d42e8fa03f46abf36273d1daadf991e7 diff --git a/assignment8.mdwn b/assignment8.mdwn index e6c6085d..a1e0140c 100644 --- a/assignment8.mdwn +++ b/assignment8.mdwn @@ -8,21 +8,25 @@ let rec move_botleft (z : 'a zipper) : 'a zipper = (* returns z if the targetted node in z has no children *) - (* else returns move_botleft (zipper which results from moving down and left in z) *) - YOU SUPPLY THE DEFINITION + (* else returns move_botleft (zipper which results from moving down from z to the leftmost child) *) + _____ + (* YOU SUPPLY THE DEFINITION *) let rec move_right_or_up (z : 'a zipper) : 'a zipper option = (* if it's possible to move right in z, returns Some (the result of doing so) *) (* else if it's not possible to move any further up in z, returns None *) (* else returns move_right_or_up (result of moving up in z) *) - YOU SUPPLY THE DEFINITION + _____ + (* YOU SUPPLY THE DEFINITION *) let new_zipper (t : 'a tree) : 'a zipper = {tree = Root; filler = t} ;; +   + let make_fringe_enumerator (t: 'a tree) = (* create a zipper targetting the root of t *) let zstart = new_zipper t @@ -129,28 +133,3 @@ (same-fringe? tree1 tree2) -