anchor.diff:  #r "System.Reactive.Linq.dll"
   
   (*
  -Goal: implement tree like structure
  +Challenge:
   
  -a) provide operations for modifying the tree.
  -b) provide some traversal which extracts leaf nodes from the tree.
  +a) create a binary tree which stores single elements in leafs.
  +b) provide a traversal function which extracts leaf nodes from the tree (fold).
   c) leaf node extraction should be incremental
   d) provide functional snapshots
   e) undelimited undo/redo while maintainging efficient updates.
  
positive.code:     aset {
          match t with 
           | Node(l,r) -> 
              let! l = l
              let! r = r
              yield! leafNodes l
              yield! leafNodes r
           | Leaf v ->
              yield v
  
negative.code: let testTree2InPersistent = testTree2 |> buildPeristent
  test ((Mod.force testTree2InPersistent) = PNode(PNode(PLeaf(1),PLeaf(2)), PLeaf 10))
  
  // let us modify the mod tree and see how the persistent representation looks like
  transact (fun () -> Mod.change l2 l2Original)
  
  test ((Mod.force testTree2InPersistent) = PNode(PNode(PLeaf 1, PLeaf 2), PNode(PLeaf 3, PLeaf 4)))
  