anchor.diff:      let rec intersect (input : CharDiet) (stream : CharDiet) : CharDiet =
           if AvlTree.Height stream > AvlTree.Height input then
               intersect stream input
  -        elif AvlTree.IsEmptyTree stream then
  -            Empty
           else
  +        match stream with
  +        | Empty -> Empty
  +        | _ ->
               #if DEBUG
               let inputCount = count input
               let streamCount = count stream
  
positive.code:         | _ ->
              AvlTree<'T>.CompareStacks (comparer, [s1], [s2])
  
      //
      static member private myadd comparer left x (right : AvlTree<'T>) =
          match right with
          | Empty ->
              Node (Empty, Empty, x, 1u)
          | Node (l, r, vx, _) ->
              if left then
                  AvlTree.Balance (comparer, AvlTree.myadd comparer left x l, r, vx)
              else
                  AvlTree.Balance (comparer, l, AvlTree.myadd comparer left x r, vx)
  
      /// Join two trees together at a pivot point.
      /// The resulting tree may be unbalanced.
      static member Join comparer (v : 'T) l (r : AvlTree<'T>) =
          match l, r with
          | Empty, _ ->
              AvlTree.myadd comparer true v r
          | _, Empty ->
              AvlTree.myadd comparer false v l
          | Node (ll, lr, lx, lh), Node (rl, rr, rx, rh) ->
              if lh > rh + 2u then
                  AvlTree.Balance (comparer, ll, AvlTree.Join comparer v lr r, lx)
              else if rh > lh + 2u then
                  AvlTree.Balance (comparer, AvlTree.Join comparer v l rl, rr, rx)
              else
                  AvlTree.Create (v, l, r)
  
      /// Reroot of balanced trees.
      static member Reroot comparer l (r : AvlTree<'T>) =
          if AvlTree.Height l > AvlTree.Height r then
              let i, l' = AvlTree.ExtractMax l
              AvlTree.Join comparer i l' r
          else
              match r with
              | Empty -> Empty
              | Node (_,_,_,_) ->
                  let i, r' = AvlTree.ExtractMin r
                  AvlTree.Join comparer i l r'
  
  
  
  /// A Discrete Interval Encoding Tree (DIET) specialized to the 'char' type.
  
negative.code:                 inputCount + streamCount
              #endif
  
              // TEMP : This is a naive implementation of the union operation --
              // we only use it here to help track down the bug in the union operation
              // and to test that the rest of the code works correctly.
              let result = AvlTree.FoldBack addRange stream input
  
  //            let result =
  //                let result, head', stream'' =
  //                    AvlTree.TryExtractMin stream
  //                    ||> union' input None
  //
  //                match head' with
  //                | None ->
  //                    result
  //                | Some i ->
  //                    AvlTree.Join comparer i result stream''
  
              #if DEBUG
              let resultCount = count result
  