anchor.diff:              #endif
   
               let result, _, _ =
  -                AvlTree.TryExtractMin stream
  +                AvlTree.TryDeleteMin stream
                   ||> diff' input
               assert (dietInvariant result)
   
  
positive.code:             match l with
              | Empty ->
                  failwith "rebalance"
              | Node (ll, lr, lx, _) ->
                  // one of the nodes must have height > height r + 1
                  if AvlTree.Height ll > AvlTree.Height lr then
                      AvlTree.Create (
                          lx,
                          ll,
                          AvlTree.Create (x, lr, r))
                  else
                      // balance right: combination
                      match lr with
                      | Empty ->
                          failwith "rebalance"
                      | Node (lrl, lrr, lrx, _) ->
                          AvlTree.Create (
                              lrx,
                              AvlTree.Create (lx, ll, lrl),
                              AvlTree.Create (x, lrr, r))
                      
          elif hr > hl + balanceTolerance then // right is heavier than left
              match r with
              | Empty ->
                  failwith "rebalance"
              | Node (rl, rr, rx, _) ->
                  // one of the nodes must have height > height t1 + 1
                  if AvlTree.Height rr > AvlTree.Height rl then
                      // rotate left
                      AvlTree.Create (
                          rx,
                          AvlTree.Create (x, l, rl),
                          rr)
                  else
                      // balance left: combination
                      match rl with
                      | Empty ->
                          failwith "rebalance"
                      | Node (rll, rlr, rlx, _) ->
                          AvlTree.Create (
                              rlx,
                              AvlTree.Create (x, l, rll),
                              AvlTree.Create (rx, rlr, rr))
          else
              AvlTree.Create (x, l, r)
  
      /// Join two trees together with the specified root element.
      /// Takes two trees representing disjoint sets and combines them, returning
      /// a new balanced tree representing the union of the two sets and the given root element.
      /// The resulting tree may be unbalanced.
          // NOTE : Are we sure about this? It looks like the resulting tree will _always_
          // be balanced in this implementation.
      static member Join (comparer, l, r : AvlTree<'T>, root) : AvlTree<'T> =
          // Preconditions
          assert (AvlTree.AvlInvariant l)
          assert (AvlTree.AvlInvariant r)
          assert (AvlTree.HeightDiff (l, r) <= (balanceTolerance + 1u))
  
          match l, r with
          | Empty, Empty ->
  
negative.code:         | _, (Node (n2l, n2r, n2k, _) :: t2) ->
              AvlTree.CompareStacks (comparer, l1, n2l :: Node (Empty, n2r, n2k, 0u) :: t2)
                  
      //
      static member Compare (comparer : IComparer<'T>, s1 : AvlTree<'T>, s2 : AvlTree<'T>) : int =
          match s1, s2 with
          | Empty, Empty -> 0
  