lists-to-contin tweaks
authorJim Pryor <profjim@jimpryor.net>
Wed, 1 Dec 2010 05:34:22 +0000 (00:34 -0500)
committerJim Pryor <profjim@jimpryor.net>
Wed, 1 Dec 2010 05:34:22 +0000 (00:34 -0500)
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
from_lists_to_continuations.mdwn

index 8c84dfb..170ae5d 100644 (file)
@@ -74,7 +74,7 @@ entire list has been unzipped (and so the zipped half of the zipper is empty).
 
        type 'a list_zipper = ('a list) * ('a list);;
        
-       let rec tz (z:char list_zipper) = 
+       let rec tz (z : char list_zipper) = 
            match z with
            | (unzipped, []) -> List.rev(unzipped) (* Done! *)
            | (unzipped, 'S'::zipped) -> tz ((List.append unzipped unzipped), zipped) 
@@ -141,7 +141,7 @@ be a function of type `char list -> char list`.  We'll call each step
 (or group of steps) a **continuation** of the recipe.  So in this
 context, a continuation is a function of type `char list -> char
 list`.  For instance, the continuation corresponding to the portion of
-the recipe below the horizontal line is the function `fun (tail:char
+the recipe below the horizontal line is the function `fun (tail : char
 list) -> 'a'::('b'::tail)`.
 
 This means that we can now represent the unzipped part of our
@@ -153,7 +153,7 @@ The structure and the behavior will follow that of `tz` above, with
 some small but interesting differences.  We've included the orginal
 `tz` to facilitate detailed comparison:
 
-       let rec tz (z:char list_zipper) = 
+       let rec tz (z : char list_zipper) = 
            match z with
            | (unzipped, []) -> List.rev(unzipped) (* Done! *)
            | (unzipped, 'S'::zipped) -> tz ((List.append unzipped unzipped), zipped)