From: Jim Pryor Date: Tue, 30 Nov 2010 16:13:23 +0000 (-0500) Subject: week11 tweaks X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=63822483bf23bc42870790e40e4424d862d36cd5 week11 tweaks Signed-off-by: Jim Pryor --- diff --git a/week11.mdwn b/week11.mdwn index 96e6d80f..97416e2c 100644 --- a/week11.mdwn +++ b/week11.mdwn @@ -148,7 +148,7 @@ Similarly for `subtree 50` and `subtree 80`. We haven't said yet what goes in th And the parent of that targetted subtree should intuitively be a tree targetted on `node 9200`: - {parent = None; siblings = [*]}, * filled by subtree 9200 + {parent = None; siblings = [*]}, * filled by tree 9200 This tree has no parents because it's the root of the base tree. Fully spelled out, then, our tree targetted on `node 50` would be: @@ -157,13 +157,13 @@ This tree has no parents because it's the root of the base tree. Fully spelled o parent = { parent = None; siblings = [*] - }, * filled by subtree 9200; + }, * filled by tree 9200; siblings = [*; subtree 920; subtree 950] }, * filled by subtree 500; siblings = [subtree 20; *; subtree 80] }, * filled by subtree 50 -In fact, there's some redundancy in this structure, at the points where we have `* filled by subtree 9200` and `* filled by subtree 500`. Since node 9200 doesn't have any label attached to it, the subtree rooted in it is determined by the rest of this structure; and so too with `subtree 500`. So we could really work with: +In fact, there's some redundancy in this structure, at the points where we have `* filled by tree 9200` and `* filled by subtree 500`. Since node 9200 doesn't have any label attached to it, the subtree rooted in it is determined by the rest of this structure; and so too with `subtree 500`. So we could really work with: { parent = { @@ -240,7 +240,7 @@ where `subtree 500'` refers to a tree built from a root node whose children are { parent = None; siblings = [*] - }, * filled by subtree 9200' + }, * filled by tree 9200' where the targetted element is the root of our base tree. Like the "moving backward" operation for the list zipper, this "moving upward" operation is supposed to be reminiscent of closing a zipper, and that's why these data structures are called zippers.