X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?a=blobdiff_plain;f=zipper-lists-continuations.mdwn;h=8858a8930699f29335825e27600ff8c2f6bbb253;hb=9273d85724c80393c8ec4dea26705c47ccdf10c8;hp=4aef298a75b11286c14b73b48c081df76f993da9;hpb=fc2cec698d708b9baab616cbedfbd4481c4057cd;p=lambda.git diff --git a/zipper-lists-continuations.mdwn b/zipper-lists-continuations.mdwn index 4aef298a..8858a893 100644 --- a/zipper-lists-continuations.mdwn +++ b/zipper-lists-continuations.mdwn @@ -561,13 +561,13 @@ _|__ _|__ Notice that we've counted each internal node twice---it's a good -excerice to adjust the code to count each node once. +exercise to adjust the code to count each node once. One more revealing example before getting down to business: replacing `state` everywhere in `treemonadizer` with `list` gives us
-# treemonadizer (fun x -> [[x; square x]]) t1;;
+# treemonadizer (fun x -> [ [x; square x] ]) t1;;
 - : int list tree list =
 [Node
   (Node (Leaf [2; 4], Leaf [3; 9]),