X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=tree_and_list_zippers.mdwn;h=81117060fcc491d1a8286dfafa387be494a5f96d;hp=5d26ca97124bd726bbf6c715404f00f02368aee7;hb=673e6ce8ada5e8f4e0f41b3900d1a4d0dbf92d1f;hpb=8e50e0b21cef6e6d5aba8265bf2aa0adbf6647d2 diff --git a/tree_and_list_zippers.mdwn b/tree_and_list_zippers.mdwn index 5d26ca97..81117060 100644 --- a/tree_and_list_zippers.mdwn +++ b/tree_and_list_zippers.mdwn @@ -66,7 +66,7 @@ The kind of data structure we're looking for here is called a **list zipper**. T would be represented as `([30; 20; 10], [40; 50; 60; 70; 80; 90])`. To move forward in the base list, we pop the head element `40` off of the head element of the second list in the zipper, and push it onto the first list, getting `([40; 30; 20; 10], [50; 60; 70; 80; 90])`. To move backwards again, we pop off of the first list, and push it onto the second. To reconstruct the base list, we just "move backwards" until the first list is empty. (This is supposed to evoke the image of zipping up a zipper; hence the data structure's name.) -We had some discussio in seminar of the right way to understand the "zipper" metaphor. I think it's best to think of the tab of the zipper being here: +We had some discussion in seminar of the right way to understand the "zipper" metaphor. I think it's best to think of the tab of the zipper being here: t a