Hi,
first of all i would like to say that i really love F# and definetly enjoy reading this book.
I had some starting problems understanding continuations,
but now i think i found a little mistake that troubled my mind.
In Listing 8-11 (p.205) the size of the tree is computed with continuations,
but the count is only increased for Tips, but the Nodes contain content as well.
If i now get it right, there should be added 1 to the result of the sub-trees in the computation.
e.g. with a tree like:
(*
x
/ \
/ \
x x
/ \ / \
o o o o
*)
let tree = Node( "n1", Node("n2",Tip("t1"),Tip("t2")), Node("n3",Tip("t3"),Tip("t4")) )
It computes a count of 4, wich is the count of Tips,
but there are actually 7 values in the tree.
Can someone confirm this, or else explain it to me please?
thx