projects
/
lambda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fc2cec6
)
edits
author
Chris Barker
<barker@omega.(none)>
Sun, 28 Nov 2010 03:35:55 +0000
(22:35 -0500)
committer
Chris Barker
<barker@omega.(none)>
Sun, 28 Nov 2010 03:35:55 +0000
(22:35 -0500)
zipper-lists-continuations.mdwn
patch
|
blob
|
history
diff --git
a/zipper-lists-continuations.mdwn
b/zipper-lists-continuations.mdwn
index
4aef298
..
8858a89
100644
(file)
--- a/
zipper-lists-continuations.mdwn
+++ b/
zipper-lists-continuations.mdwn
@@
-561,13
+561,13
@@
_|__ _|__
</pre>
Notice that we've counted each internal node twice---it's a good
</pre>
Notice that we've counted each internal node twice---it's a good
-ex
ceric
e to adjust the code to count each node once.
+ex
ercis
e 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
<pre>
One more revealing example before getting down to business: replacing
`state` everywhere in `treemonadizer` with `list` gives us
<pre>
-# 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]),
- : int list tree list =
[Node
(Node (Leaf [2; 4], Leaf [3; 9]),