anchor.diff:                  thisCount + leftCount + rightCount
                   |> cont
   
  -    //
  +    /// Returns the number of elements in the set.
       [<CompiledName("Count")>]
       let count tree =
           countImpl tree id
  
positive.code:             else
                  cont t (* value in [x, y] *)
  
      //
      [<CompiledName("Add")>]
      let add value tree =
          addImpl value tree id
  
negative.code:             // Produce the sequence for the right subtree.
              yield! toSeq right }
  
      /// Creates a new set from the given enumerable object.
      [<CompiledName("OfSeq")>]
      let ofSeq seq =
          (empty, seq)
          ||> Seq.fold (fun tree el ->
              add el tree)
  
      /// Returns the highest (greatest) value in the set.
      [<CompiledName("MaxElement")>]
      let rec maxElement tree =
          match tree with
          | Empty ->
              invalidArg "tree" "Cannot retrieve the maximum element of an empty set."
          | Node (_,_,_,(Node (_,_,_,_) as right)) ->
              maxElement right
          | Node (_,maxEl,_,_) ->
              maxEl
  
      /// Returns the lowest (least) value in the set. 
      [<CompiledName("MinElement")>]
      let rec minElement tree =
          match tree with
          | Empty ->
              invalidArg "tree" "Cannot retrieve the minimum element of an empty set."
          | Node (_,_,(Node (_,_,_,_) as left),_) ->
              minElement left
          | Node (minEl,_,_,_) ->
              minEl
  
      /// Splits the set into two sets containing the elements for which
      /// the given predicate returns true and false respectively.
      [<CompiledName("Partition")>]
      let partition predicate set =
          ((empty, empty), set)
          ||> fold (fun (trueSet, falseSet) el ->
              if predicate el then
                  add el trueSet,
                  falseSet
              else
                  trueSet,
                  add el falseSet)
  
      /// Returns a new set with the elements of the second set removed from the first.
      [<CompiledName("Difference")>]
      let difference set1 set2 =
          // OPTIMIZE : This needs to be re-implemented in a
          // much more efficient way for it to be useful!
  
          // TEMP : This works, but it's **slow**.
          (empty, set1)
          ||> fold (fun set1' el ->
              if contains el set2 then
                  set1'
              else
                  add el set1')
  
      /// Computes the intersection of the two sets.
      [<CompiledName("Intersect")>]
      let intersect set1 set2 =
          // OPTIMIZE : This needs to be re-implemented in a
          // much more efficient way for it to be useful!
  
          // TEMP : This works, but it's **slow**.
          let smaller, larger =
              if count set1 < count set2 then
                  set1, set2
              else set2, set1
  
          (empty, smaller)
          ||> fold (fun intersection el ->
              if contains el larger then
                  add el intersection
              else
                  intersection)    
  
      /// Computes the union of the two sets.
      [<CompiledName("Union")>]
      let union set1 set2 =
          // OPTIMIZE : This needs to be re-implemented in a
          // much more efficient way for it to be useful!
  
          // TEMP : This works, but it's **slow**.
          let smaller, larger =
              if count set1 < count set2 then
                  set1, set2
              else set2, set1
  
          (larger, smaller)
          ||> fold (fun union el ->
              add el union)
  
      /// Returns a sequence of tuples <c>(lower, upper)</c>
      /// containing the intervals of values in the set.
      [<CompiledName("Intervals")>]
      let rec intervals tree =
          seq {
  