anchor.diff:  
   test (resultingLeafNodes |> setEqual [1;2;10])
   
  -// (c) done. (incremental extraction of modifiable trees)
  +// (c) done. (incremental fold for adaptive binary trees)
   
   // Okay, we have incremental updates to trees. But what if we want functional snapshots?
   // let us adaptively convert our mod tree to a persistent one!
  
positive.code: // by the way, our modification also updated our leaf list
  test (testTree2 |> leafNodes |> setEqual [1;2;3;4])
  
  // since i want to use the same variable names as before i use a fresh module.... here
  // (just for presentation purpose)
  module UndoRedo =
      // lets go move on to undo redo
      // in order to implement undo redo generically, we need a way to tell some undo/redo
      // scope what mods should be tracked (e.g. camera moves shall not be tracked globally)
      // please note that undo redo here was just a 40 line sketch by gh. But as you will see,
      // this solution is so beautiful, concise, efficient and awesome.
  
      // let us now create a tree just as before but we use special mod ctors 
  
      let scope = UndoRedoScope()
  
      // let us now create the tree just like before but by using the undo redo scope
      let leaf v = Leaf (scope.initMod v)
  
negative.code:     aset {
          match t with 
           | Node(l,r) -> 
              let! l = l // children are mod, read them adaptively
              let! r = r
              yield! leafNodes l // then recurse and use yield! 
                                 // since the rec call returns an aset
              yield! leafNodes r
           | Leaf v ->
              yield v
  