anchor.diff:  
       /// An empty DIET.
       let empty : CharDiet =
  -        AvlTree.empty
  +        AvlTree.Empty
   
       /// Determines if a DIET is empty.
       let inline isEmpty (tree : CharDiet) =
  -        AvlTree.isEmpty tree
  +        AvlTree.IsEmptyTree tree
   
       /// Determines if a DIET contains a specified value.
       let rec contains value (tree : CharDiet) =
           match tree with
           | Empty ->
               false
  -        | Node ((x, y), left, right, _) ->
  +        | Node (left, right, (x, y), _) ->
               if value < x then
                   contains value left
               elif value > y then
  
positive.code:     //
      static member IterateIntervals (action, charSet : CharSet) =
          let action = FSharpFunc<_,_,_>.Adapt action
          charSet.DietSet
          |> AvlTree.iter action.Invoke
  
      interface System.IComparable with
          member this.CompareTo other =
  
negative.code:         match tree with
          | Empty ->
              Empty, false, Empty
          | Node (l, r, (a, b), _) ->
              let cxa = compare x a
              if cxa < 0 then
                  let ll, pres, rl = split x l
                  ll, pres, AvlTree.Join comparer (a, b) rl r
              else
                  let cbx = compare b x
                  if cbx < 0 then
                      let lr, pres, rr = split x r
                      AvlTree.Join comparer (a, b) l lr, pres, rr
                  else
                      (if cxa = 0 then l else addRange (a, pred x) l),
                      true,
                      (if cbx = 0 then r else addRange (succ x, b) r)
  
      /// Applies the given accumulating function to all elements in a DIET.
      let fold (folder : 'State -> char -> 'State) (state : 'State) (tree : CharDiet) =
          // Preconditions
          // NONE -- Skip null check because the Empty tree is represented as null.
  
          let folder = FSharpFunc<_,_,_>.Adapt folder
  
          let rangeFolder (state : 'State) (lo, hi) =
              // Fold over the items in increasing order.
              let mutable state = state
              for x = int lo to int hi do
                  state <- folder.Invoke (state, char x)
              state
  
          AvlTree.Fold rangeFolder state tree
  
      /// Applies the given accumulating function to all elements in a DIET.
      let foldBack (folder : char -> 'State -> 'State) (tree : CharDiet) (state : 'State) =
          // Preconditions
          // NONE -- Skip null check because the Empty tree is represented as null.
  
          let folder = FSharpFunc<_,_,_>.Adapt folder
  
          let rangeFolder (lo, hi) (state : 'State) =
              // Fold over the items in decreasing order.
              let mutable state = state
              for x = int hi downto int lo do
                  state <- folder.Invoke (char x, state)
              state
  
          AvlTree.FoldBack rangeFolder state tree
  
      /// Applies the given function to all elements in a DIET.
      let iter (action : char -> unit) (tree : CharDiet) =
          // Preconditions
          // NONE -- Skip null check because the Empty tree is represented as null.
  
          /// Applies the action to all values within an interval.
          let intervalApplicator (lo, hi) =
              for x = int lo to int hi do
                  action (char x)
  
          AvlTree.Iter intervalApplicator tree
  
      //
      let forall (predicate : char -> bool) (t : CharDiet) =
          // OPTIMIZE : Rewrite this to short-circuit and return early
          // if we find a non-matching element.
          (true, t)
          ||> fold (fun state el ->
              state && predicate el)
  
      //
      let exists (predicate : char -> bool) (t : CharDiet) =
          // OPTIMIZE : Rewrite this to short-circuit and return early
          // if we find a non-matching element.
          (false, t)
          ||> fold (fun state el ->
              state || predicate el)
  
      //
      let rec toSeq (tree : CharDiet) =
          seq {
          match tree with
          | Empty -> ()
          | Node (l, r, (x, y), _) ->
              yield! toSeq l
              yield! seq {x .. y}
              yield! toSeq r
          }
  
      //
      let toList (tree : CharDiet) =
          ([], tree)
          ||> fold (fun list el ->
              el :: list)
  
      //
      let toArray (tree : CharDiet) =
          let elements = ResizeArray ()
          iter elements.Add tree
          elements.ToArray ()
  
      //
      let toSet (tree : CharDiet) =
          (Set.empty, tree)
          ||> fold (fun set el ->
              Set.add el set)
  
      /// Builds a new DIET from the elements of a sequence.
      let ofSeq (sequence : seq<_>) : CharDiet =
          (Empty, sequence)
          ||> Seq.fold (fun tree el ->
              add el tree)
  
      /// Builds a new DIET from the elements of an F# list.
      let ofList (list : _ list) : CharDiet =
          (Empty, list)
          ||> List.fold (fun tree el ->
              add el tree)
  
      /// Builds a new DIET from the elements of an array.
      let ofArray (array : _[]) : CharDiet =
          (Empty, array)
          ||> Array.fold (fun tree el ->
              add el tree)
  
      /// Builds a new DIET from an F# Set.
      let ofSet (set : Set<_>) : CharDiet =
          (Empty, set)
          ||> Set.fold (fun tree el ->
              add el tree)
  
  
  /// Character set implementation based on a Discrete Interval Encoding Tree.
  