+(* annotate leaves as they're visited *)
+
+let annotater : int -> (int * int) State_monad.m =
+ fun (a : int) -> fun s -> ((a,s+1), s+1);;
+
+let initial_store = 0 in
+TreeState.monadize annotater t1 initial_store;;
+
+
+(* copy tree with different choices for leaves *)