-Notice that we've counted each internal node twice---it's a good
-exercise to adjust the code to count each node once.
-
-<!--
-A tree with n leaves has 2n - 1 nodes.
-This function will currently return n*1 + (n-1)*2 = 3n - 2.
-To convert b = 3n - 2 into 2n - 1, we can use: let n = (b + 2)/3 in 2*n -1
-
-But I assume Chris means here, adjust the code so that no corrections of this sort have to be applied.
--->
-
+Why does this work? Because the operation `fun a -> fun s -> (a, s+1)` takes an `int` and wraps it in an `int state` monadic box that increments the state. When we give that same operations to our `tree_monadize` function, it then wraps an `int tree` in a box, one that does the same state-incrementing for each of its leaves.